Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
get trace category from surf_action instead of smx_action when tracing categorized...
[simgrid.git] / src / instr / smx_instr.c
index c95ac72..1ff402b 100644 (file)
@@ -16,11 +16,12 @@ void TRACE_smx_action_execute (smx_action_t act)
   if (!IS_TRACING) return;
 
   act->counter = counter++;
-  category = __TRACE_current_category_get (SIMIX_process_self());
+  category = TRACE_category_get (SIMIX_process_self());
   if (category){
-       act->category = xbt_new (char, strlen (category)+1);
-       strncpy (act->category, category, strlen(category)+1);
+    act->category = xbt_new (char, strlen (category)+1);
+    strncpy (act->category, category, strlen(category)+1);
   }
+  TRACE_surf_resource_utilization_start (act);
 }
 
 void TRACE_smx_action_communicate (smx_action_t act, smx_process_t proc)
@@ -29,10 +30,11 @@ void TRACE_smx_action_communicate (smx_action_t act, smx_process_t proc)
   if (!IS_TRACING) return;
 
   act->counter = counter++;
-  category = __TRACE_current_category_get (proc);
+  category = TRACE_category_get (proc);
   if (category){
     act->category = xbt_strdup (category);
   }
+  TRACE_surf_resource_utilization_start (act);
 }
 
 void TRACE_smx_action_destroy (smx_action_t act)
@@ -42,6 +44,7 @@ void TRACE_smx_action_destroy (smx_action_t act)
   if (act->category){
     xbt_free (act->category);
   }
+  TRACE_surf_resource_utilization_end (act);
 }
 
 #endif