Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further cleanups in instr
[simgrid.git] / src / smpi / internals / instr_smpi.cpp
index 69ffcb27b3c5a74790f2fe6b4b7579cfac8fa914..a83443b5afc91e0e6fa773fa96ef6bda8b0c6f04 100644 (file)
@@ -4,7 +4,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "private.h"
 #include "private.hpp"
 #include <cctype>
 #include <cstdarg>
@@ -209,7 +208,7 @@ void TRACE_smpi_init(int rank)
      * multiple times but only the last one would be used...
      */
     if (s_type::getOrNull(it.first.c_str(), container->type_) == nullptr) {
-      Type::variableNew(it.first.c_str(), nullptr, container->type_);
+      Type::variableNew(it.first.c_str(), "", container->type_);
     }
   }
 #endif
@@ -238,7 +237,7 @@ void TRACE_smpi_collective_in(int rank, const char *operation, instr_extra_data
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
   const char *color = instr_find_color (operation);
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
 
@@ -267,7 +266,7 @@ void TRACE_smpi_computing_init(int rank)
  simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
  const char* color     = instr_find_color("computing");
  new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type,
-                                    simgrid::instr::Value::get_or_new("computing", color, type));
+                                    simgrid::instr::Value::byNameOrCreate("computing", color, type));
 }
 
 void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
@@ -282,7 +281,7 @@ void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("computing", nullptr, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("computing", "", type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
 
@@ -308,7 +307,7 @@ void TRACE_smpi_sleeping_init(int rank)
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
   const char *color = instr_find_color ("sleeping");
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", color, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val);
 }
 
@@ -324,7 +323,7 @@ void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", nullptr, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", "", type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
 
@@ -351,7 +350,7 @@ void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("test", nullptr, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("test", "", type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
 
@@ -378,7 +377,7 @@ void TRACE_smpi_ptp_in(int rank, const char *operation, instr_extra_data extra)
   container_t container = PJ_container_get (str);
   simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
   const char *color = instr_find_color (operation);
-  simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
+  simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }