Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Now it works (if you don't look at the leaks)
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 2 May 2017 15:28:57 +0000 (17:28 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 2 May 2017 15:28:57 +0000 (17:28 +0200)
13 files changed:
src/instr/instr_interface.cpp
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_private.h
src/instr/instr_resource_utilization.cpp
src/instr/instr_trace.cpp
src/msg/instr_msg_process.cpp
src/msg/instr_msg_task.cpp
src/msg/msg_vm.cpp
src/smpi/colls/smpi_automatic_selector.cpp
src/smpi/instr_smpi.cpp
src/surf/instr_routing.cpp
src/surf/instr_surf.cpp

index a3b3b87..7946c2b 100644 (file)
@@ -249,7 +249,7 @@ void TRACE_mark(const char *mark_type, const char *mark_value)
 
   val_t value = PJ_value_get (mark_value, type);
   XBT_DEBUG("MARK %s %s", mark_type, mark_value);
 
   val_t value = PJ_value_get (mark_value, type);
   XBT_DEBUG("MARK %s %s", mark_type, mark_value);
-  NewEvent (MSG_get_clock(), PJ_container_get_root(), type, value);
+  new NewEvent (MSG_get_clock(), PJ_container_get_root(), type, value);
 }
 
 /** \ingroup TRACE_mark
 }
 
 /** \ingroup TRACE_mark
@@ -289,13 +289,13 @@ static void instr_user_variable(double time, const char *resource, const char *v
       type_t type = PJ_type_get (variable, container->type);
       switch (what){
       case INSTR_US_SET:
       type_t type = PJ_type_get (variable, container->type);
       switch (what){
       case INSTR_US_SET:
-        SetVariableEvent(time, container, type, value);
+        new SetVariableEvent(time, container, type, value);
         break;
       case INSTR_US_ADD:
         break;
       case INSTR_US_ADD:
-        AddVariableEvent(time, container, type, value);
+        new AddVariableEvent(time, container, type, value);
         break;
       case INSTR_US_SUB:
         break;
       case INSTR_US_SUB:
-        SubVariableEvent(time, container, type, value);
+        new SubVariableEvent(time, container, type, value);
         break;
       default:
         THROW_IMPOSSIBLE;
         break;
       default:
         THROW_IMPOSSIBLE;
@@ -964,7 +964,7 @@ void TRACE_host_set_state (const char *host, const char *state, const char *valu
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
   val_t val = PJ_value_get_or_new (value, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
   val_t val = PJ_value_get_or_new (value, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
-  SetStateEvent(MSG_get_clock(), container, type, val);
+  new SetStateEvent(MSG_get_clock(), container, type, val);
 }
 
 /** \ingroup TRACE_user_variables
 }
 
 /** \ingroup TRACE_user_variables
@@ -983,7 +983,7 @@ void TRACE_host_push_state (const char *host, const char *state, const char *val
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
   val_t val = PJ_value_get_or_new (value, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
   val_t val = PJ_value_get_or_new (value, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
-  PushStateEvent(MSG_get_clock(), container, type, val);
+  new PushStateEvent(MSG_get_clock(), container, type, val);
 }
 
 /** \ingroup TRACE_user_variables
 }
 
 /** \ingroup TRACE_user_variables
@@ -1000,7 +1000,7 @@ void TRACE_host_pop_state (const char *host, const char *state)
 {
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
 {
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
-  PopStateEvent(MSG_get_clock(), container, type);
+  new PopStateEvent(MSG_get_clock(), container, type);
 }
 
 /** \ingroup TRACE_user_variables
 }
 
 /** \ingroup TRACE_user_variables
@@ -1017,7 +1017,7 @@ void TRACE_host_reset_state (const char *host, const char *state)
 {
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
 {
   container_t container = PJ_container_get(host);
   type_t type = PJ_type_get (state, container->type);
-  ResetStateEvent(MSG_get_clock(), container, type);
+  new ResetStateEvent(MSG_get_clock(), container, type);
 }
 
 /** \ingroup TRACE_API
 }
 
 /** \ingroup TRACE_API
index d134d20..8843d09 100644 (file)
@@ -20,10 +20,11 @@ static std::stringstream stream;
 
 void buffer_debug(std::vector<PajeEvent*> *buf);
 void buffer_debug(std::vector<PajeEvent*> *buf) {
 
 void buffer_debug(std::vector<PajeEvent*> *buf);
 void buffer_debug(std::vector<PajeEvent*> *buf) {
+  return;
   XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
   for (auto event :*buf){
     event->print();
   XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
   for (auto event :*buf){
     event->print();
-    XBT_DEBUG("%s", stream.str().c_str());
+    XBT_DEBUG("%p %s", event, stream.str().c_str());
     stream.str("");
     stream.clear();
   }
     stream.str("");
     stream.clear();
   }
@@ -43,6 +44,7 @@ static void init_stream(PajeEvent* event) {
 static void print_row() {
   stream << std::endl;
   fprintf(tracing_file, "%s", stream.str().c_str());
 static void print_row() {
   stream << std::endl;
   fprintf(tracing_file, "%s", stream.str().c_str());
+  XBT_DEBUG("Dump %s", stream.str().c_str());
   stream.str("");
   stream.clear();
 }
   stream.str("");
   stream.clear();
 }
index 12f6266..c9baee5 100644 (file)
@@ -179,7 +179,7 @@ type_t PJ_type_link_new (const char *name, type_t father, type_t source, type_t
   ret = newType (name, key, nullptr, TYPE_LINK, father);
   XBT_DEBUG("LinkType %s(%s), child of %s(%s)  %s(%s)->%s(%s)", ret->name, ret->id, father->name, father->id,
             source->name, source->id, dest->name, dest->id);
   ret = newType (name, key, nullptr, TYPE_LINK, father);
   XBT_DEBUG("LinkType %s(%s), child of %s(%s)  %s(%s)->%s(%s)", ret->name, ret->id, father->name, father->id,
             source->name, source->id, dest->name, dest->id);
-  DefineLinkTypeEvent(ret, source, dest);
+  new DefineLinkTypeEvent(ret, source, dest);
   return ret;
 }
 
   return ret;
 }
 
@@ -195,4 +195,4 @@ type_t PJ_type_state_new (const char *name, type_t father)
   XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
   new DefineStateTypeEvent(ret);
   return ret;
   XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
   new DefineStateTypeEvent(ret);
   return ret;
-}
\ No newline at end of file
+}
index ef17a58..0102392 100644 (file)
@@ -114,13 +114,11 @@ class s_container {
 typedef s_container s_container_t;
 
 //--------------------------------------------------
 typedef s_container s_container_t;
 
 //--------------------------------------------------
-class PajeEvent;
-
 class PajeEvent {
   public:
   double timestamp;
   e_event_type event_type;
 class PajeEvent {
   public:
   double timestamp;
   e_event_type event_type;
-  virtual void print(){};
+  virtual void print() = 0;
   void *data;
   virtual ~PajeEvent();
 };
   void *data;
   virtual ~PajeEvent();
 };
@@ -151,7 +149,7 @@ class DefineStateTypeEvent : public PajeEvent  {
   type_t type;
   public:
   DefineStateTypeEvent(type_t type);
   type_t type;
   public:
   DefineStateTypeEvent(type_t type);
-  void print();// override;
+  void print() override;
 };
 
 class DefineEventTypeEvent : public PajeEvent  {
 };
 
 class DefineEventTypeEvent : public PajeEvent  {
index e8d8489..0cfed5e 100644 (file)
@@ -29,7 +29,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now, const char *vari
   if (!xbt_dict_get_or_null(platform_variables, key)) {
     container_t container = PJ_container_get (resource);
     type_t type = PJ_type_get (variable, container->type);
   if (!xbt_dict_get_or_null(platform_variables, key)) {
     container_t container = PJ_container_get (resource);
     type_t type = PJ_type_get (variable, container->type);
-    SetVariableEvent (now, container, type, 0);
+    new SetVariableEvent (now, container, type, 0);
     xbt_dict_set(platform_variables, key, (char*)"", nullptr);
   }
   xbt_free(key);
     xbt_dict_set(platform_variables, key, (char*)"", nullptr);
   }
   xbt_free(key);
@@ -38,8 +38,8 @@ static void __TRACE_surf_check_variable_set_to_zero(double now, const char *vari
 static void instr_event (double now, double delta, type_t variable, container_t resource, double value)
 {
   __TRACE_surf_check_variable_set_to_zero(now, variable->name, resource->name);
 static void instr_event (double now, double delta, type_t variable, container_t resource, double value)
 {
   __TRACE_surf_check_variable_set_to_zero(now, variable->name, resource->name);
-  AddVariableEvent(now, resource, variable, value);
-  SubVariableEvent(now + delta, resource, variable, value);
+  new AddVariableEvent(now, resource, variable, value);
+  new SubVariableEvent(now + delta, resource, variable, value);
 }
 
 /* TRACE_surf_link_set_utilization: entry point from SimGrid */
 }
 
 /* TRACE_surf_link_set_utilization: entry point from SimGrid */
index f962223..b226de9 100644 (file)
@@ -63,7 +63,7 @@ void TRACE_paje_dump_buffer (int force)
   if (!TRACE_is_enabled()) return;
   XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
   if (force){
   if (!TRACE_is_enabled()) return;
   XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
   if (force){
-    for (auto event :buffer){
+    for (auto event : buffer){
       event->print();
       delete event;
     }
       event->print();
       delete event;
     }
@@ -111,12 +111,16 @@ static void insert_into_buffer (PajeEvent* tbi)
   else
     XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__,
         std::distance(buffer.rbegin(),i));
   else
     XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__,
         std::distance(buffer.rbegin(),i));
+
+  buffer_debug(&buffer);
 }
 
 PajeEvent:: ~PajeEvent()
 {
 }
 
 PajeEvent:: ~PajeEvent()
 {
-  XBT_DEBUG("%s not implemented: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, timestamp);
+  XBT_DEBUG("%s not implemented for %p: event_type=%d, timestamp=%f", __FUNCTION__,
+      this, (int)event_type, timestamp);
+//  xbt_backtrace_display_current();
+
  /* switch (event->event_type){
   case PAJE_StartLink:
     xbt_free (((startLink_t)(event->data))->value);
  /* switch (event->event_type){
   case PAJE_StartLink:
     xbt_free (((startLink_t)(event->data))->value);
@@ -228,7 +232,6 @@ DestroyContainerEvent::DestroyContainerEvent (container_t container)
 
   XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
 
 
   XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
 
-  //print it
   print();
 }
 
   print();
 }
 
@@ -245,7 +248,6 @@ SetVariableEvent::SetVariableEvent (double timestamp, container_t container, typ
   insert_into_buffer (this);
 }
 
   insert_into_buffer (this);
 }
 
-
 AddVariableEvent::AddVariableEvent (double timestamp, container_t container, type_t type, double value)
 {
   this->event_type                         = PAJE_AddVariable;
 AddVariableEvent::AddVariableEvent (double timestamp, container_t container, type_t type, double value)
 {
   this->event_type                         = PAJE_AddVariable;
@@ -318,9 +320,8 @@ PushStateEvent::PushStateEvent (double timestamp, container_t container, type_t
 
 
 PushStateEvent::PushStateEvent (double timestamp, container_t container, type_t type, val_t value)
 
 
 PushStateEvent::PushStateEvent (double timestamp, container_t container, type_t type, val_t value)
-{
-  new PushStateEvent(timestamp, container, type, value, nullptr);
-}
+ : PushStateEvent(timestamp, container, type, value, nullptr)
+{}
 
 PopStateEvent::PopStateEvent (double timestamp, container_t container, type_t type)
 {
 
 PopStateEvent::PopStateEvent (double timestamp, container_t container, type_t type)
 {
@@ -347,25 +348,25 @@ ResetStateEvent::ResetStateEvent (double timestamp, container_t container, type_
   insert_into_buffer (this);
 }
 
   insert_into_buffer (this);
 }
 
-StartLinkEvent::StartLinkEvent (double timestamp, container_t container, type_t type, container_t sourceContainer,
-                        const char *value, const char *key)
-{
-  StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1);
-}
+StartLinkEvent::StartLinkEvent (double timestamp, container_t container,
+    type_t type, container_t sourceContainer, const char *value, const char *key)
+  : StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
+{}
 
 StartLinkEvent::StartLinkEvent (double timestamp, container_t container, type_t type, container_t sourceContainer,
                                 const char *value, const char *key, int size)
 {
   event_type                             = PAJE_StartLink;
 
 StartLinkEvent::StartLinkEvent (double timestamp, container_t container, type_t type, container_t sourceContainer,
                                 const char *value, const char *key, int size)
 {
   event_type                             = PAJE_StartLink;
-  timestamp                              = timestamp;
+  this->timestamp       = timestamp;
   this->type            = type;
   this->container       = container;
   this->sourceContainer = sourceContainer;
   this->type            = type;
   this->container       = container;
   this->sourceContainer = sourceContainer;
-  value           = xbt_strdup(value);
-  key             = xbt_strdup(key);
+  this->value           = xbt_strdup(value);
+  this->key             = xbt_strdup(key);
   this->size            = size;
 
   this->size            = size;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__,
+      (int)event_type, this->timestamp, this->value);
 
   insert_into_buffer (this);
 }
 
   insert_into_buffer (this);
 }
index 2639834..145bc34 100644 (file)
@@ -38,7 +38,7 @@ void TRACE_msg_process_change_host(msg_process_t process, msg_host_t old_host, m
     //start link
     container_t msg = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
     //start link
     container_t msg = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
-    StartLinkEvent (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+    new StartLinkEvent (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
 
     //destroy existing container of this process
     TRACE_msg_process_destroy (MSG_process_get_name (process), MSG_process_get_PID (process));
 
     //destroy existing container of this process
     TRACE_msg_process_destroy (MSG_process_get_name (process), MSG_process_get_PID (process));
@@ -49,7 +49,7 @@ void TRACE_msg_process_change_host(msg_process_t process, msg_host_t old_host, m
     //end link
     msg = PJ_container_get(instr_process_id(process, str, len));
     type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
     //end link
     msg = PJ_container_get(instr_process_id(process, str, len));
     type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
-    EndLinkEvent (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+    new EndLinkEvent (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
   }
 }
 
   }
 }
 
@@ -95,7 +95,7 @@ void TRACE_msg_process_suspend(msg_process_t process)
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("suspend", type);
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("suspend", type);
-    PushStateEvent (MSG_get_clock(), process_container, type, value);
+    new PushStateEvent (MSG_get_clock(), process_container, type, value);
   }
 }
 
   }
 }
 
@@ -107,7 +107,7 @@ void TRACE_msg_process_resume(msg_process_t process)
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
-    PopStateEvent (MSG_get_clock(), process_container, type);
+    new PopStateEvent (MSG_get_clock(), process_container, type);
   }
 }
 
   }
 }
 
@@ -120,7 +120,7 @@ void TRACE_msg_process_sleep_in(msg_process_t process)
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("sleep", type);
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("sleep", type);
-    PushStateEvent (MSG_get_clock(), process_container, type, value);
+    new PushStateEvent (MSG_get_clock(), process_container, type, value);
   }
 }
 
   }
 }
 
@@ -132,6 +132,6 @@ void TRACE_msg_process_sleep_out(msg_process_t process)
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
-    PopStateEvent (MSG_get_clock(), process_container, type);
+    new PopStateEvent (MSG_get_clock(), process_container, type);
   }
 }
   }
 }
index 6c42c12..65b69cc 100644 (file)
@@ -53,7 +53,7 @@ void TRACE_msg_task_execute_start(msg_task_t task)
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("task_execute", type);
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("task_execute", type);
-    PushStateEvent (MSG_get_clock(), process_container, type, value);
+    new PushStateEvent (MSG_get_clock(), process_container, type, value);
   }
 }
 
   }
 }
 
@@ -67,7 +67,7 @@ void TRACE_msg_task_execute_end(msg_task_t task)
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
-    PopStateEvent (MSG_get_clock(), process_container, type);
+    new PopStateEvent (MSG_get_clock(), process_container, type);
   }
 }
 
   }
 }
 
@@ -93,7 +93,7 @@ void TRACE_msg_task_get_start()
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("receive", type);
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("receive", type);
-    PushStateEvent (MSG_get_clock(), process_container, type, value);
+    new PushStateEvent (MSG_get_clock(), process_container, type, value);
   }
 }
 
   }
 }
 
@@ -107,12 +107,12 @@ void TRACE_msg_task_get_end(double start_time, msg_task_t task)
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
-    PopStateEvent (MSG_get_clock(), process_container, type);
+    new PopStateEvent (MSG_get_clock(), process_container, type);
 
     char key[INSTR_DEFAULT_STR_SIZE];
     snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
     type = PJ_type_get ("MSG_PROCESS_TASK_LINK", PJ_type_get_root());
 
     char key[INSTR_DEFAULT_STR_SIZE];
     snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
     type = PJ_type_get ("MSG_PROCESS_TASK_LINK", PJ_type_get_root());
-    EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
+    new EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
   }
 }
 
   }
 }
 
@@ -128,12 +128,12 @@ int TRACE_msg_task_put_start(msg_task_t task)
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("send", type);
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
     val_t value = PJ_value_get ("send", type);
-    PushStateEvent (MSG_get_clock(), process_container, type, value);
+    new PushStateEvent (MSG_get_clock(), process_container, type, value);
 
     char key[INSTR_DEFAULT_STR_SIZE];
     snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
     type = PJ_type_get ("MSG_PROCESS_TASK_LINK", PJ_type_get_root());
 
     char key[INSTR_DEFAULT_STR_SIZE];
     snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
     type = PJ_type_get ("MSG_PROCESS_TASK_LINK", PJ_type_get_root());
-    StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
+    new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
   }
 
   return 1;
   }
 
   return 1;
@@ -149,6 +149,6 @@ void TRACE_msg_task_put_end()
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
     type_t type = PJ_type_get ("MSG_PROCESS_STATE", process_container->type);
-    PopStateEvent (MSG_get_clock(), process_container, type);
+    new PopStateEvent (MSG_get_clock(), process_container, type);
   }
 }
   }
 }
index 95718a4..1049c45 100644 (file)
@@ -207,7 +207,7 @@ void MSG_vm_start(msg_vm_t vm)
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("start", "0 0 1", type); // start is blue
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("start", "0 0 1", type); // start is blue
-    PushStateEvent(MSG_get_clock(), vm_container, type, value);
+    new PushStateEvent(MSG_get_clock(), vm_container, type, value);
   }
 }
 
   }
 }
 
@@ -319,7 +319,7 @@ static int migration_rx_fun(int argc, char *argv[])
     // start link
     container_t msg = PJ_container_get(vm->cname());
     type_t type     = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     // start link
     container_t msg = PJ_container_get(vm->cname());
     type_t type     = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
-    StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+    new StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
 
     // destroy existing container of this vm
     container_t existing_container = PJ_container_get(vm->cname());
 
     // destroy existing container of this vm
     container_t existing_container = PJ_container_get(vm->cname());
@@ -332,7 +332,7 @@ static int migration_rx_fun(int argc, char *argv[])
     // end link
     msg  = PJ_container_get(vm->cname());
     type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
     // end link
     msg  = PJ_container_get(vm->cname());
     type = PJ_type_get("MSG_VM_LINK", PJ_type_get_root());
-    EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+    new EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
   }
 
   // Inform the SRC that the migration has been correctly performed
   }
 
   // Inform the SRC that the migration has been correctly performed
@@ -823,7 +823,7 @@ void MSG_vm_suspend(msg_vm_t vm)
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("suspend", "1 0 0", type); // suspend is red
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
     val_t value              = PJ_value_get_or_new("suspend", "1 0 0", type); // suspend is red
-    PushStateEvent(MSG_get_clock(), vm_container, type, value);
+    new PushStateEvent(MSG_get_clock(), vm_container, type, value);
   }
 }
 
   }
 }
 
@@ -839,7 +839,7 @@ void MSG_vm_resume(msg_vm_t vm)
   if (TRACE_msg_vm_is_enabled()) {
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
   if (TRACE_msg_vm_is_enabled()) {
     container_t vm_container = PJ_container_get(vm->cname());
     type_t type              = PJ_type_get("MSG_VM_STATE", vm_container->type);
-    PopStateEvent(MSG_get_clock(), vm_container, type);
+    new PopStateEvent(MSG_get_clock(), vm_container, type);
   }
 }
 
   }
 }
 
index 2a1edb5..40c061b 100644 (file)
@@ -20,7 +20,7 @@
          char cont_name[25];\
          snprintf(cont_name,25, "rank-%d", smpi_process()->index());\
          val_t value = PJ_value_get_or_new(Colls::mpi_coll_##cat##_description[i].name,"1.0 1.0 1.0", type);\
          char cont_name[25];\
          snprintf(cont_name,25, "rank-%d", smpi_process()->index());\
          val_t value = PJ_value_get_or_new(Colls::mpi_coll_##cat##_description[i].name,"1.0 1.0 1.0", type);\
-         NewEvent (SIMIX_get_clock(), PJ_container_get(cont_name), type, value);\
+         new NewEvent (SIMIX_get_clock(), PJ_container_get(cont_name), type, value);\
       }
 
 #define AUTOMATIC_COLL_BENCH(cat, ret, args, args2)\
       }
 
 #define AUTOMATIC_COLL_BENCH(cat, ret, args, args2)\
index a4a7b2d..3084597 100644 (file)
@@ -246,7 +246,7 @@ void TRACE_smpi_collective_in(int rank, int root, const char *operation, instr_e
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   val_t value = PJ_value_get_or_new (operation, color, type);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   val_t value = PJ_value_get_or_new (operation, color, type);
-   PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+  new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
 }
 
 void TRACE_smpi_collective_out(int rank, int root, const char *operation)
 }
 
 void TRACE_smpi_collective_out(int rank, int root, const char *operation)
@@ -259,7 +259,7 @@ void TRACE_smpi_collective_out(int rank, int root, const char *operation)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
 
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
 
-  PopStateEvent (SIMIX_get_clock(), container, type);
+  new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
 void TRACE_smpi_computing_init(int rank)
 }
 
 void TRACE_smpi_computing_init(int rank)
@@ -274,7 +274,7 @@ void TRACE_smpi_computing_init(int rank)
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color ("computing");
   val_t value = PJ_value_get_or_new ("computing", color, type);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color ("computing");
   val_t value = PJ_value_get_or_new ("computing", color, type);
-  PushStateEvent (SIMIX_get_clock(), container, type, value);
+  new PushStateEvent (SIMIX_get_clock(), container, type, value);
 }
 
 void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
 }
 
 void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
@@ -290,7 +290,7 @@ void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("computing", nullptr, type);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("computing", nullptr, type);
-  PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+  new PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
 }
 
 void TRACE_smpi_computing_out(int rank)
 }
 
 void TRACE_smpi_computing_out(int rank)
@@ -301,7 +301,7 @@ void TRACE_smpi_computing_out(int rank)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
-  PopStateEvent (SIMIX_get_clock(), container, type);
+  new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
 void TRACE_smpi_sleeping_init(int rank)
 }
 
 void TRACE_smpi_sleeping_init(int rank)
@@ -316,7 +316,7 @@ void TRACE_smpi_sleeping_init(int rank)
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color ("sleeping");
   val_t value = PJ_value_get_or_new ("sleeping", color, type);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color ("sleeping");
   val_t value = PJ_value_get_or_new ("sleeping", color, type);
-  PushStateEvent (SIMIX_get_clock(), container, type, value);
+  new PushStateEvent (SIMIX_get_clock(), container, type, value);
 }
 
 void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
 }
 
 void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
@@ -332,7 +332,7 @@ void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("sleeping", nullptr, type);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("sleeping", nullptr, type);
-  PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+  new PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
 }
 
 void TRACE_smpi_sleeping_out(int rank)
 }
 
 void TRACE_smpi_sleeping_out(int rank)
@@ -343,7 +343,7 @@ void TRACE_smpi_sleeping_out(int rank)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
-  PopStateEvent (SIMIX_get_clock(), container, type);
+  new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
 void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
 }
 
 void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
@@ -359,7 +359,7 @@ void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("test", nullptr, type);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   val_t value = PJ_value_get_or_new ("test", nullptr, type);
-  PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+  new PushStateEvent  (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
 }
 
 void TRACE_smpi_testing_out(int rank)
 }
 
 void TRACE_smpi_testing_out(int rank)
@@ -370,7 +370,7 @@ void TRACE_smpi_testing_out(int rank)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
-  PopStateEvent (SIMIX_get_clock(), container, type);
+  new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, instr_extra_data extra)
 }
 
 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, instr_extra_data extra)
@@ -386,7 +386,7 @@ void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, instr_
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   val_t value = PJ_value_get_or_new (operation, color, type);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   val_t value = PJ_value_get_or_new (operation, color, type);
-  PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
+  new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
 }
 
 void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation)
 }
 
 void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation)
@@ -399,7 +399,7 @@ void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
 
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_STATE", container->type);
 
-  PopStateEvent (SIMIX_get_clock(), container, type);
+  new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
 void TRACE_smpi_send(int rank, int src, int dst, int tag, int size)
 }
 
 void TRACE_smpi_send(int rank, int src, int dst, int tag, int size)
@@ -415,7 +415,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int tag, int size)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
-  StartLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
+  new StartLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
 }
 
 void TRACE_smpi_recv(int rank, int src, int dst, int tag)
 }
 
 void TRACE_smpi_recv(int rank, int src, int dst, int tag)
@@ -431,5 +431,5 @@ void TRACE_smpi_recv(int rank, int src, int dst, int tag)
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
   container_t container = PJ_container_get (str);
   type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
-  EndLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
+  new EndLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
 }
 }
index 0b46803..ed9411b 100644 (file)
@@ -120,8 +120,8 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
   snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", counter);
   counter++;
 
   snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", counter);
   counter++;
 
-  StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
-  EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
+  new StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
+  new EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
 
   XBT_DEBUG ("  linkContainers %s <-> %s", src->name, dst->name);
 }
 
   XBT_DEBUG ("  linkContainers %s <-> %s", src->name, dst->name);
 }
@@ -223,8 +223,8 @@ static void instr_routing_parse_start_link(simgrid::s4u::Link& link)
     if (latency == nullptr) {
       latency = PJ_type_variable_new("latency", nullptr, container->type);
     }
     if (latency == nullptr) {
       latency = PJ_type_variable_new("latency", nullptr, container->type);
     }
-    SetVariableEvent(0, container, bandwidth, bandwidth_value);
-    SetVariableEvent(0, container, latency, latency_value);
+    new SetVariableEvent(0, container, bandwidth, bandwidth_value);
+    new SetVariableEvent(0, container, latency, latency_value);
   }
   if (TRACE_uncategorized()) {
     type_t bandwidth_used = PJ_type_get_or_null("bandwidth_used", container->type);
   }
   if (TRACE_uncategorized()) {
     type_t bandwidth_used = PJ_type_get_or_null("bandwidth_used", container->type);
@@ -246,7 +246,7 @@ void sg_instr_new_host(simgrid::s4u::Host& host)
     }
 
     double current_speed_state = host.speed();
     }
 
     double current_speed_state = host.speed();
-    SetVariableEvent (0, container, speed, current_speed_state);
+    new SetVariableEvent (0, container, speed, current_speed_state);
   }
   if (TRACE_uncategorized()){
     type_t speed_used = PJ_type_get_or_null ("power_used", container->type);
   }
   if (TRACE_uncategorized()){
     type_t speed_used = PJ_type_get_or_null ("power_used", container->type);
index d1e986c..801036a 100644 (file)
@@ -24,7 +24,7 @@ void TRACE_surf_host_set_speed(double date, const char *resource, double speed)
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
     type_t type = PJ_type_get ("power", container->type);
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
     type_t type = PJ_type_get ("power", container->type);
-    SetVariableEvent(date, container, type, speed);
+    new SetVariableEvent(date, container, type, speed);
   }
 }
 
   }
 }
 
@@ -33,7 +33,7 @@ void TRACE_surf_link_set_bandwidth(double date, const char *resource, double ban
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
     type_t type = PJ_type_get ("bandwidth", container->type);
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
     type_t type = PJ_type_get ("bandwidth", container->type);
-    SetVariableEvent(date, container, type, bandwidth);
+    new SetVariableEvent(date, container, type, bandwidth);
   }
 }
 
   }
 }