X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f254fadb0d35cf8dbf727769ea4bf6b99a7d5efb..65e338fbfd769d49b29242bfe56cde18c03b6074:/src/instr/smx_instr.c diff --git a/src/instr/smx_instr.c b/src/instr/smx_instr.c index bb959d5e70..229b15bf68 100644 --- a/src/instr/smx_instr.c +++ b/src/instr/smx_instr.c @@ -18,9 +18,10 @@ void TRACE_smx_action_execute (smx_action_t act) act->counter = counter++; 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) @@ -33,6 +34,7 @@ void TRACE_smx_action_communicate (smx_action_t act, smx_process_t 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