Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
if tracing category X is created, define pX for hosts, bX for links
[simgrid.git] / src / instr / instr_routing.c
index ce53d21..9609830 100644 (file)
@@ -71,7 +71,7 @@ static void linkContainers (const char *a1, const char *a2, xbt_dict_t filter)
   type_t a2_type = a2_container->type;
 
   container_t container = findCommonFather (getRootContainer(), a1_container, a2_container);
-  xbt_assert0 (container != NULL, "common father not found");
+  xbt_assert (container != NULL, "common father not found");
 
   //declare type
   char link_typename[INSTR_DEFAULT_STR_SIZE];
@@ -144,7 +144,7 @@ static void recursiveGraphExtraction (container_t container, xbt_dict_t filter)
             //no route between them, that's possible
             continue;
           }
-          xbt_assert2(route!=NULL,
+          xbt_assert(route!=NULL,
               "there is no ASroute between %s and %s", child_name1, child_name2);
           unsigned int cpt;
           void *link;
@@ -298,8 +298,15 @@ void instr_routing_define_callbacks ()
  */
 static void recursiveNewUserVariableType (const char *new_typename, const char *color, type_t root)
 {
-  if (!strcmp (root->name, "HOST") || !strcmp (root->name, "LINK")){
-    getVariableType(new_typename, color, root);
+  if (!strcmp (root->name, "HOST")){
+    char tnstr[INSTR_DEFAULT_STR_SIZE];
+    snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
+    getVariableType(tnstr, color, root);
+  }
+  if (!strcmp (root->name, "LINK")){
+    char tnstr[INSTR_DEFAULT_STR_SIZE];
+    snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
+    getVariableType(tnstr, color, root);
   }
   xbt_dict_cursor_t cursor = NULL;
   type_t child_type;