Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] renaming function to follow up parameters
[simgrid.git] / src / instr / instr_interface.c
index ce8d58f..33d2803 100644 (file)
@@ -91,7 +91,7 @@ int TRACE_create_category_with_color(const char *category,
       "Category (used as parent) %s is not created", parent_category);
   //check if category is created
   char *created = xbt_dict_get_or_null(created_categories, category);
-  xbt_assert1 (created == NULL, "Category %s is already defined", category);
+  if (created) return 0;
 
   pajeCreateContainer(MSG_get_clock(), category, type, parent_category,
                       category);
@@ -111,10 +111,10 @@ int TRACE_create_category_with_color(const char *category,
 
   /* for registering application categories on top of platform */
   snprintf(state, 100, "b%s", category);
-  if (TRACE_platform_is_enabled())
+  if (TRACE_categorized ())
     pajeDefineVariableTypeWithColor(state, "LINK", state, final_color);
   snprintf(state, 100, "p%s", category);
-  if (TRACE_platform_is_enabled())
+  if (TRACE_categorized ())
     pajeDefineVariableTypeWithColor(state, "HOST", state, final_color);
 
   val_one = xbt_strdup("1");