Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] fix categorized resource utilization tracing (follow the new internal API)
authorschnorr <Lucas.Schnorr@imag.fr>
Tue, 6 Mar 2012 14:57:41 +0000 (15:57 +0100)
committerschnorr <Lucas.Schnorr@imag.fr>
Tue, 6 Mar 2012 17:00:34 +0000 (18:00 +0100)
src/surf/cpu_cas01.c
src/surf/network.c

index e922b65..b9cf415 100644 (file)
@@ -245,12 +245,9 @@ static void update_action_remaining_lazy(double now)
                               (cpu_maxmin_system,
                                GENERIC_LMM_ACTION(action).variable, 0));
         TRACE_surf_host_set_utilization(cpu->generic_resource.name,
-                                        action->generic_lmm_action.
-                                        generic_action.data,
-                                        (surf_action_t) action,
-                                        lmm_variable_getvalue
-                                        (GENERIC_LMM_ACTION(action).
-                                         variable), GENERIC_LMM_ACTION(action).last_update,
+                                        ((surf_action_t)action)->category,
+                                        lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
+                                        GENERIC_LMM_ACTION(action).last_update,
                                         now - GENERIC_LMM_ACTION(action).last_update);
       }
 #endif
@@ -361,8 +358,7 @@ static void cpu_update_actions_state_lazy(double now, double delta)
                             (cpu_maxmin_system,
                              GENERIC_LMM_ACTION(action).variable, 0));
       TRACE_surf_host_set_utilization(cpu->generic_resource.name,
-                                      GENERIC_LMM_ACTION(action).generic_action.data,
-                                      (surf_action_t) action,
+                                      ((surf_action_t)action)->category,
                                       lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
                                       GENERIC_LMM_ACTION(action).last_update,
                                       now - GENERIC_LMM_ACTION(action).last_update);
@@ -409,11 +405,11 @@ static void cpu_update_actions_state_full(double now, double delta)
                              GENERIC_LMM_ACTION(action).variable, 0));
 
       TRACE_surf_host_set_utilization(x->generic_resource.name,
-                                      GENERIC_ACTION(action).data,
-                                      (surf_action_t) action,
-                                      lmm_variable_getvalue
-                                      (GENERIC_LMM_ACTION(action).
-                                       variable), now - delta, delta);
+                                      ((surf_action_t)action)->category,
+                                      lmm_variable_getvalue(GENERIC_LMM_ACTION(action).
+                                       variable),
+                                      now - delta,
+                                      delta);
       TRACE_last_timestamp_to_dump = now - delta;
     }
 #endif
index 493623e..c925f3b 100644 (file)
@@ -563,12 +563,11 @@ static void net_update_actions_state_full(double now, double delta)
       link_CM02_t link;
       unsigned int i;
       xbt_dynar_foreach(route, i, link) {
-        TRACE_surf_link_set_utilization(link->lmm_resource.
-            generic_resource.name,
-            GENERIC_ACTION(action).data,
-            (surf_action_t) action,
-            lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
-            now - delta, delta);
+        TRACE_surf_link_set_utilization(link->lmm_resource.generic_resource.name,
+                                        ((surf_action_t)action)->category,
+                                        lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
+                                        now - delta,
+                                        delta);
       }
     }
 #endif