osaf/services/saf/amf/amfd/imm.cc        |  40 +++++--------------------------
 osaf/services/saf/amf/amfd/include/imm.h |   2 +-
 2 files changed, 8 insertions(+), 34 deletions(-)


Remove some unnecessary traces

Also add more context to trace messages relating to various
job queue exec() functions

diff --git a/osaf/services/saf/amf/amfd/imm.cc 
b/osaf/services/saf/amf/amfd/imm.cc
--- a/osaf/services/saf/amf/amfd/imm.cc
+++ b/osaf/services/saf/amf/amfd/imm.cc
@@ -76,7 +76,7 @@ AvdJobDequeueResultT ImmObjCreate::exec(
        SaAisErrorT rc;
        AvdJobDequeueResultT res;
        
-       TRACE_ENTER();
+       TRACE_ENTER2("Create %s", parentName_.value);
 
        rc = saImmOiRtObjectCreate_2(immOiHandle, className_,
                                     &parentName_, attrValues_);
@@ -110,8 +110,6 @@ ImmObjCreate::~ImmObjCreate()
 {
        unsigned int i, j;
 
-       TRACE_ENTER();
-
        for (i = 0; attrValues_[i] != NULL; i++) {
                SaImmAttrValuesT_2 *attrValue =
                        (SaImmAttrValuesT_2 *)attrValues_[i];
@@ -130,8 +128,6 @@ ImmObjCreate::~ImmObjCreate()
 
        delete [] className_;
        delete [] attrValues_;
-       
-       TRACE_LEAVE();
 }
 
 //
@@ -144,7 +140,7 @@ AvdJobDequeueResultT ImmObjUpdate::exec(
        const SaImmAttrModificationT_2 *attrMods[] = {&attrMod, NULL};
        SaImmAttrValueT attrValues[] = {value_};
 
-       TRACE_ENTER2("%s %s", dn_.value, attributeName_);
+       TRACE_ENTER2("Update '%s' %s", dn_.value, attributeName_);
 
        attrMod.modType = SA_IMM_ATTR_VALUES_REPLACE;
        attrMod.modAttr.attrName = attributeName_;
@@ -180,11 +176,8 @@ AvdJobDequeueResultT ImmObjUpdate::exec(
 //
 ImmObjUpdate::~ImmObjUpdate()
 {
-       TRACE_ENTER();
        delete [] attributeName_;
        delete [] static_cast<char*>(value_);
-       TRACE_LEAVE();
-
 }
 
 //
@@ -221,13 +214,6 @@ AvdJobDequeueResultT ImmObjDelete::exec(
 }
 
 //
-ImmObjDelete::~ImmObjDelete()
-{
-       TRACE_ENTER();
-       TRACE_LEAVE();
-}
-
-//
 AvdJobDequeueResultT ImmAdminResponse::exec(const SaImmOiHandleT handle) {
        SaAisErrorT rc;
        AvdJobDequeueResultT res;
@@ -266,27 +252,19 @@ Job* Fifo::peek()
 {
        Job* tmp;
        
-       TRACE_ENTER();
-
        if (imm_job_.empty()) {
                tmp = 0;
-       }
-       else {
+       } else {
                tmp = imm_job_.front();
        }
        
-       TRACE_LEAVE();
        return tmp;
 }
 
 //
 void Fifo::queue(Job* job)
 {
-       TRACE_ENTER();
-       
        imm_job_.push(job);
-       
-       TRACE_LEAVE();
 }
 
 //
@@ -294,17 +272,13 @@ Job* Fifo::dequeue()
 {
        Job* tmp;
        
-       TRACE_ENTER();
-
        if (imm_job_.empty()) {
                tmp = 0;
-       }
-       else {
+       } else {
                tmp = imm_job_.front();
                imm_job_.pop();
        }
        
-       TRACE_LEAVE();
        return tmp;
 }
 
@@ -1516,7 +1490,7 @@ void avd_saImmOiRtObjectUpdate_sync(cons
 void avd_saImmOiRtObjectUpdate(const SaNameT *dn, const char *attributeName,
        SaImmValueTypeT attrValueType, void *value)
 {
-       TRACE_ENTER();
+       TRACE_ENTER2("'%s' %s", dn->value, attributeName);
        
        size_t sz;
 
@@ -1547,7 +1521,7 @@ void avd_saImmOiRtObjectUpdate(const SaN
 void avd_saImmOiRtObjectCreate(const char *className,
        const SaNameT *parentName, const SaImmAttrValuesT_2 **attrValues)
 {
-       TRACE_ENTER();
+       TRACE_ENTER2("%s %s", className, parentName->value);
 
        if (avd_cb->avail_state_avd != SA_AMF_HA_ACTIVE)
                return;
@@ -1569,7 +1543,7 @@ void avd_saImmOiRtObjectCreate(const cha
  */
 void avd_saImmOiRtObjectDelete(const SaNameT* dn)
 {
-       TRACE_ENTER();
+       TRACE_ENTER2("%s", dn->value);
        
        if (avd_cb->avail_state_avd != SA_AMF_HA_ACTIVE)
                return;
diff --git a/osaf/services/saf/amf/amfd/include/imm.h 
b/osaf/services/saf/amf/amfd/include/imm.h
--- a/osaf/services/saf/amf/amfd/include/imm.h
+++ b/osaf/services/saf/amf/amfd/include/imm.h
@@ -88,7 +88,7 @@ public:
        
        AvdJobDequeueResultT exec(SaImmOiHandleT immOiHandle);
        
-       ~ImmObjDelete();
+       ~ImmObjDelete() {}
 };
 
 class ImmAdminResponse : public Job {

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to