From: Martin Quinson Date: Mon, 19 Jun 2017 12:20:49 +0000 (+0200) Subject: Merge branch 'master' of github.com:simgrid/simgrid X-Git-Tag: v3.16~39 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2f3bc1bedb87e982714241309c59180d10d87c94?hp=a2ef66264d76199e320e579c3122c2d78cf17155 Merge branch 'master' of github.com:simgrid/simgrid --- diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 5ef6fb4e31..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) { diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index 02c935cf5d..9fd1dfec5e 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -143,7 +143,7 @@ type_t PJ_type_event_new (const char *name, type_t father) type_t ret = newType (name, name, nullptr, TYPE_EVENT, father); XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id); - new DefineEventTypeEvent(ret); + LogDefineEventType(ret); return ret; } diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 64e6080b00..658663e469 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -141,13 +141,6 @@ class DefineStateTypeEvent : public PajeEvent { void print() override; }; -class DefineEventTypeEvent : public PajeEvent { - type_t type; - public: - DefineEventTypeEvent(type_t type); - void print() override; -}; - class SetVariableEvent : public PajeEvent { container_t container; @@ -443,5 +436,6 @@ void LogLinkTypeDefinition(type_t type, type_t source, type_t dest); void LogEntityValue (val_t value); void LogContainerCreation (container_t container); void LogContainerDestruction (container_t container); +void LogDefineEventType(type_t type); #endif