Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] do not check what is traced in internal resource utilization tracing functions
[simgrid.git] / src / instr / instr_resource_utilization.c
index 8e7e92d..5f4ec1d 100644 (file)
@@ -37,7 +37,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now,
     xbt_dynar_t array = xbt_dynar_new(sizeof(char *), xbt_free);
     char *var_cpy = xbt_strdup(variable);
     xbt_dynar_push(array, &var_cpy);
-    if (IS_TRACING_PLATFORM)
+    if (TRACE_platform_is_enabled())
       pajeSetVariable(now, variable, resource, "0");
     xbt_dict_set(platform_variables, resource, array,
                  xbt_dynar_free_voidp);
@@ -54,7 +54,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now,
     if (flag == 0) {
       char *var_cpy = xbt_strdup(variable);
       xbt_dynar_push(array, &var_cpy);
-      if (IS_TRACING_PLATFORM)
+      if (TRACE_platform_is_enabled())
         pajeSetVariable(now, variable, resource, "0");
     }
   }
@@ -79,9 +79,6 @@ static void __TRACE_A_event(smx_action_t action, double now, double delta,
                             const char *variable, const char *resource,
                             double value)
 {
-  if (!IS_TRACING_PLATFORM)
-    return;
-
   char valuestr[100];
   snprintf(valuestr, 100, "%f", value);
 
@@ -104,9 +101,6 @@ static void __TRACE_B_alloc(void)
 
 static void __TRACE_B_release(void)
 {
-  if (!IS_TRACING_PLATFORM)
-    return;
-
   char *key, *time;
   xbt_dict_cursor_t cursor = NULL;
   xbt_dict_foreach(method_b_dict, cursor, key, time) {
@@ -132,9 +126,6 @@ static void __TRACE_B_event(smx_action_t action, double now, double delta,
                             const char *variable, const char *resource,
                             double value)
 {
-  if (!IS_TRACING_PLATFORM)
-    return;
-
   char key_time[INSTR_DEFAULT_STR_SIZE];
   char key_value[INSTR_DEFAULT_STR_SIZE];
   char nowstr[INSTR_DEFAULT_STR_SIZE];
@@ -279,7 +270,7 @@ void TRACE_surf_link_set_utilization(void *link, smx_action_t smx_action,
                                      double value, double now,
                                      double delta)
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   if (!value)
     return;
@@ -317,7 +308,7 @@ void TRACE_surf_host_set_utilization(const char *name,
                                      double value, double now,
                                      double delta)
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   if (!value)
     return;
@@ -343,7 +334,7 @@ void TRACE_surf_host_set_utilization(const char *name,
  */
 void TRACE_surf_resource_utilization_start(smx_action_t action)
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   TRACE_method_start(action);
 }
@@ -354,21 +345,21 @@ void TRACE_surf_resource_utilization_event(smx_action_t action, double now,
                                            const char *resource,
                                            double value)
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   TRACE_method_event(action, now, delta, variable, resource, value);
 }
 
 void TRACE_surf_resource_utilization_end(smx_action_t action)
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   TRACE_method_end(action);
 }
 
 void TRACE_surf_resource_utilization_release()
 {
-  if (!IS_TRACING)
+  if (!TRACE_is_active())
     return;
   TRACE_method_release();
 }