Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] isolating buffer dumping from the simulation, only dump if trace is enabled
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 28 Apr 2011 13:44:26 +0000 (15:44 +0200)
committerLucas Schnorr <Lucas.Schnorr@inf.ufrgs.br>
Tue, 24 May 2011 12:42:25 +0000 (14:42 +0200)
src/instr/instr_paje_trace.c

index cd14471..a8060aa 100644 (file)
@@ -176,6 +176,7 @@ double TRACE_last_timestamp_to_dump = 0;
 //dumps the trace file until the timestamp TRACE_last_timestamp_to_dump
 void TRACE_paje_dump_buffer (int force)
 {
+  if (!TRACE_is_enabled()) return;
   XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
   if (force){
     paje_event_t event;