Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] debug messages for tracing data structures (creation and destruction)
[simgrid.git] / src / instr / instr_paje.c
index 275b57d..678d1d0 100644 (file)
@@ -46,6 +46,7 @@ static type_t newType (const char *typename, const char *key, const char *color,
 
   if (father != NULL){
     xbt_dict_set (father->children, key, ret, NULL);
+    DEBUG2("new type %s, child of %s", typename, father->name);
   }
   return ret;
 }
@@ -83,7 +84,7 @@ type_t getEventType (const char *typename, const char *color, type_t father)
     }else{
       ret = newType (typename, typename, color, TYPE_EVENT, father);
     }
-    //INFO4("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+    DEBUG4("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
     new_pajeDefineEventType(ret);
   }
   return ret;
@@ -99,7 +100,7 @@ type_t getVariableType (const char *typename, const char *color, type_t father)
     }else{
       ret = newType (typename, typename, color, TYPE_VARIABLE, father);
     }
-    //INFO4("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+    DEBUG4("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
     new_pajeDefineVariableType (ret);
   }
   return ret;
@@ -123,7 +124,7 @@ type_t getLinkType (const char *typename, type_t father, type_t source, type_t d
   type_t ret = xbt_dict_get_or_null (father->children, key);
   if (ret == NULL){
     ret = newType (typename, key, NULL, TYPE_LINK, father);
-    //INFO8("LinkType %s(%s), child of %s(%s)  %s(%s)->%s(%s)", ret->name, ret->id, father->name, father->id, source->name, source->id, dest->name, dest->id);
+    DEBUG8("LinkType %s(%s), child of %s(%s)  %s(%s)->%s(%s)", ret->name, ret->id, father->name, father->id, source->name, source->id, dest->name, dest->id);
     new_pajeDefineLinkType(ret, source, dest);
   }
   return ret;
@@ -134,7 +135,7 @@ type_t getStateType (const char *typename, type_t father)
   type_t ret = xbt_dict_get_or_null (father->children, typename);
   if (ret == NULL){
     ret = newType (typename, typename, NULL, TYPE_STATE, father);
-    //INFO4("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+    DEBUG4("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
     new_pajeDefineStateType(ret);
   }
   return ret;
@@ -160,6 +161,7 @@ container_t newContainer (const char *name, e_container_types kind, container_t
   // level depends on level of father
   if (new->father){
     new->level = new->father->level+1;
+    DEBUG2("new container %s, child of %s", name, father->name);
   }else{
     new->level = 0;
   }
@@ -262,6 +264,8 @@ void destroyContainer (container_t container)
     xbt_dict_remove(container->father->children, container->name);
   }
 
+  DEBUG1("destroy container %s", container->name);
+
   //trace my destruction
   new_pajeDestroyContainer(container);