Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix leak of memory caused by DefineEventTypeEvent call
[simgrid.git] / src / instr / instr_paje_trace.cpp
index 825183e..3a1033d 100644 (file)
@@ -258,9 +258,6 @@ if (instr_fmt_type == instr_fmt_paje) {
 
 void LogStateTypeDefinition(type_t type)
 {
-
-  XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineStateType);
-
   //print it
 if (instr_fmt_type == instr_fmt_paje) {
     XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, PAJE_DefineStateType, TRACE_precision(), 0.);
@@ -276,24 +273,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) {
@@ -325,7 +311,6 @@ void LogEntityValue (val_t value)
   XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineEntityValue);
   //print it
 if (instr_fmt_type == instr_fmt_paje) {
-    XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, PAJE_DefineEntityValue, TRACE_precision(),0.);
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << PAJE_DefineEntityValue;
     stream << " " << value->id << " " << value->father->id << " " << value->name;
@@ -347,7 +332,6 @@ void LogContainerCreation (container_t container)
   XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, PAJE_CreateContainer,timestamp);
 
 if (instr_fmt_type == instr_fmt_paje) {
-    XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, PAJE_CreateContainer, TRACE_precision(), timestamp);
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << PAJE_CreateContainer;
     stream << " ";
@@ -399,7 +383,6 @@ void LogContainerDestruction(container_t container)
   XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, PAJE_DestroyContainer, timestamp);
 
 if (instr_fmt_type == instr_fmt_paje) {
-    XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, PAJE_DestroyContainer, TRACE_precision(), timestamp);
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << PAJE_DestroyContainer;
     stream << " ";