Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure this variable is always initialized
[simgrid.git] / src / surf / cpu_ti.c
index 54e8834..0da2860 100644 (file)
@@ -85,8 +85,6 @@ static surf_cpu_ti_timeSeries_t surf_cpu_ti_time_series_new(tmgr_trace_t
   series->trace_index = xbt_malloc0(sizeof(int) * total_alloc);
   series->trace_value = xbt_malloc0(sizeof(double) * total_alloc);
 
-/* FIXME: it doesn't work with traces with only one point and periodicity = 0
- * if the trace is always cyclic and periodicity must be > 0 it works */
   xbt_dynar_foreach(power_trace->event_list, cpt, val) {
     /* delta = the next trace event
      * value = state until next event */
@@ -597,8 +595,8 @@ static void update_actions_state(double now, double delta)
   surf_action_cpu_ti_t action;
   while ((xbt_heap_size(action_heap) > 0)
          && (xbt_heap_maxkey(action_heap) <= now)) {
-    DEBUG1("Action %p: finish", action);
     action = xbt_heap_pop(action_heap);
+    DEBUG1("Action %p: finish", action);
     GENERIC_ACTION(action).finish = surf_get_clock();
     /* set the remains to 0 due to precision problems when updating the remaining amount */
     GENERIC_ACTION(action).remains = 0;