X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8710733042ed7302d2e983ec3e8bd018a125cd7f..29a6449f96953b36d2741ce31e2d971ef33ddfb6:/src/instr/instr_paje_trace.cpp?ds=sidebyside diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 4ab700479e..7172f7e3fd 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -37,13 +37,12 @@ static void print_row() { static void print_timestamp(paje_event_t event) { stream << " "; /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */ - if (event->timestamp == 0) + if (event->timestamp < 1e-12) stream << 0; else stream << event->timestamp; } - template static void print_default_pajeLink_row(paje_event_t& event) { init_stream(event); print_timestamp(event); @@ -76,7 +75,7 @@ template static void print_default_pajeVariable_row(paje_event_t& ev print_row(); } -void TRACE_paje_init(void) { +void TRACE_paje_init() { active_writer.print_DefineContainerType = print_pajeDefineContainerType; active_writer.print_DefineVariableType = print_pajeDefineVariableType; active_writer.print_DefineStateType = print_pajeDefineStateType; @@ -97,7 +96,7 @@ void TRACE_paje_init(void) { active_writer.print_NewEvent = print_pajeNewEvent; } -void TRACE_paje_start(void) { +void TRACE_paje_start() { char *filename = TRACE_get_filename(); tracing_file = fopen(filename, "w"); if (tracing_file == nullptr){ @@ -127,7 +126,7 @@ void TRACE_paje_start(void) { TRACE_header(TRACE_basic(),TRACE_display_sizes()); } -void TRACE_paje_end(void) { +void TRACE_paje_end() { fclose(tracing_file); char *filename = TRACE_get_filename(); XBT_DEBUG("Filename %s is closed", filename);