X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ccd6663fd46c3b97016f00952d425310281f21ac..62bd5986b2a76f8bc3328296e8b425f1c03ae0b6:/src/instr/instr_paje_trace.cpp diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 5ef6fb4e31..6773824574 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -28,10 +28,8 @@ static xbt_dict_t tracing_files = nullptr; // TI specific static double prefix=0.0; // TI specific -void print_NULL(PajeEvent* event){} - /* The active set of functions for the selected trace format - * By default, they all do nothing, hence the print_NULL to avoid segfaults */ + * By default, they all do nothing */ std::vector buffer; void buffer_debug(std::vector *buf); @@ -271,24 +269,13 @@ if (instr_fmt_type == instr_fmt_paje) { } -DefineEventTypeEvent::DefineEventTypeEvent(type_t type) +void LogDefineEventType(type_t type) { - this->event_type = PAJE_DefineEventType; - this->timestamp = 0; - this->type = type; - - XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type); - //print it - print(); -} - - -void DefineEventTypeEvent::print() { if (instr_fmt_type == instr_fmt_paje) { - XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp); + XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, PAJE_DefineEventType, TRACE_precision(), 0.); stream << std::fixed << std::setprecision(TRACE_precision()); - stream << (int)this->event_type; + stream << PAJE_DefineEventType; stream << " " << type->id << " " << type->father->id << " " << type->name; print_row(); } else if (instr_fmt_type == instr_fmt_TI) { @@ -398,8 +385,8 @@ if (instr_fmt_type == instr_fmt_paje) { /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */ if (timestamp < 1e-12) stream << 0; - else - stream << timestamp; + else + stream << timestamp; stream << " " << container->type->id << " " << container->id; print_row(); } else if (instr_fmt_type == instr_fmt_TI) {