X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3d115a4b467e0d20e7fb14db8f68fd2026555c13..183a6118a95c570b0c66695505dab7dbebc0c7b3:/src/instr/instr_paje_trace.cpp diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 1139f44d87..651368514d 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -271,24 +271,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) { @@ -345,12 +334,12 @@ if (instr_fmt_type == instr_fmt_paje) { stream << PAJE_CreateContainer; stream << " "; /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */ - if (timestamp < 1e-12) - stream << 0; - else - stream << timestamp; - stream << " " << container->id << " " << container->type->id << " " << container->father->id << " \"" - << container->name << "\""; + if (timestamp < 1e-12) + stream << 0; + else + stream << timestamp; + stream << " " << container->id << " " << container->type->id << " " << container->father->id << " \"" + << container->name << "\""; print_row(); } else if (instr_fmt_type == instr_fmt_TI) {