From: Arnaud Legrand Date: Mon, 4 Feb 2013 13:04:14 +0000 (+0100) Subject: Bug fix in trace management. X-Git-Tag: v3_9~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0b57cd385897350c3d6d3fedbc4d44f61f4a9fa3 Bug fix in trace management. When using periodicity, the first event indicates when events start and has undefined value (-1) as the value of the resource is used (e.g., the bandwidth value precised in the xml file). When looping with periodicity, the -1 value was used, which resulted in links with bandwidth -1.0 and could be noticed only in very specific situations. --- diff --git a/src/surf/trace_mgr.c b/src/surf/trace_mgr.c index 5b45dab9bd..3d174c40a8 100644 --- a/src/surf/trace_mgr.c +++ b/src/surf/trace_mgr.c @@ -444,7 +444,7 @@ tmgr_trace_event_t tmgr_history_get_next_event_leq(tmgr_history_t h, trace_event->idx++; } else if (event->delta > 0) { /* Last element, checking for periodicity */ xbt_heap_push(h->heap, trace_event, event_date + event->delta); - trace_event->idx = 0; + trace_event->idx = 1; /* not 0 as the first event is a placeholder to handle when events really start */ } else { /* We don't need this trace_event anymore */ trace_event->free_me = 1; }