From: Takishipp Date: Tue, 13 Jun 2017 09:54:30 +0000 (+0200) Subject: remove DefineVariableEvent X-Git-Tag: v3.16~63^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7d002fc71f86ae6e429f611deffc33dceb18b31c?hp=d12de13701e94b8b5e72e48faaea4b9941c9a23f remove DefineVariableEvent --- diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index b520463e80..cab9eefca8 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -236,24 +236,18 @@ void DefineContainerEvent(type_t type) -DefineVariableTypeEvent::DefineVariableTypeEvent(type_t type) +void DefineVariableTypeEvent(type_t type) { - this->event_type = PAJE_DefineVariableType; - this->timestamp = 0; - this->type = type; + e_event_type event_type = PAJE_DefineVariableType; + double timestamp = 0; XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type); //print it - print (); - delete this; -} - -void DefineVariableTypeEvent::print() { - if (instr_fmt_type == instr_fmt_paje) { +if (instr_fmt_type == instr_fmt_paje) { XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp); stream << std::fixed << std::setprecision(TRACE_precision()); - stream << (int)this->event_type; + stream << (int)event_type; stream << " " << type->id << " " << type->father->id << " " << type->name; if (type->color) stream << " \"" << type->color << "\""; @@ -265,6 +259,7 @@ void DefineVariableTypeEvent::print() { } } + DefineStateTypeEvent::DefineStateTypeEvent(type_t type) { this->event_type = PAJE_DefineStateType; diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index c4fb6cf495..af481486fb 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -162,7 +162,7 @@ type_t PJ_type_variable_new (const char *name, const char *color, type_t father) ret = newType (name, name, color, TYPE_VARIABLE, father); } XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id); - new DefineVariableTypeEvent (ret); + DefineVariableTypeEvent (ret); return ret; } diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index f2a359460f..ac6366acb9 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -125,13 +125,6 @@ class PajeEvent { //-------------------------------------------------- -class DefineVariableTypeEvent : public PajeEvent -{ - public: - type_t type; - DefineVariableTypeEvent(type_t type); - void print() override; -}; //-------------------------------------------------- class DefineStateTypeEvent : public PajeEvent { @@ -467,5 +460,6 @@ extern instr_fmt_type_t instr_fmt_type; SG_END_DECL() void DefineContainerEvent(type_t type); +void DefineVariableTypeEvent(type_t type); #endif