Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
follow the naming conventions in Instr
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 28 Aug 2017 09:56:13 +0000 (11:56 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 28 Aug 2017 09:56:13 +0000 (11:56 +0200)
13 files changed:
src/instr/instr_interface.cpp
src/instr/instr_paje_containers.cpp
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_paje_values.cpp
src/instr/instr_private.h
src/instr/instr_resource_utilization.cpp
src/msg/instr_msg_process.cpp
src/msg/instr_msg_task.cpp
src/msg/msg_vm.cpp
src/smpi/internals/instr_smpi.cpp
src/surf/instr_routing.cpp
src/surf/instr_surf.cpp

index 64169c4..3f079eb 100644 (file)
@@ -283,7 +283,7 @@ static void instr_user_variable(double time, const char* resource, const char* v
       char valuestr[100];
       snprintf(valuestr, 100, "%g", value);
       container_t container = PJ_container_get(resource);
-      simgrid::instr::Type* type = PJ_type_get(variable, container->type);
+      simgrid::instr::Type* type = PJ_type_get(variable, container->type_);
       switch (what){
       case INSTR_US_SET:
         new simgrid::instr::SetVariableEvent(time, container, type, value);
@@ -946,7 +946,7 @@ void TRACE_host_state_declare_value (const char *state, const char *value, const
 void TRACE_host_set_state(const char* host, const char* state, const char* value_str)
 {
   container_t container = PJ_container_get(host);
-  simgrid::instr::Type* type = PJ_type_get(state, container->type);
+  simgrid::instr::Type* type = PJ_type_get(state, container->type_);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(
       value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
   new simgrid::instr::SetStateEvent(MSG_get_clock(), container, type, val);
@@ -966,7 +966,7 @@ void TRACE_host_set_state(const char* host, const char* state, const char* value
 void TRACE_host_push_state(const char* host, const char* state, const char* value_str)
 {
   container_t container = PJ_container_get(host);
-  simgrid::instr::Type* type = PJ_type_get(state, container->type);
+  simgrid::instr::Type* type = PJ_type_get(state, container->type_);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(
       value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
   new simgrid::instr::PushStateEvent(MSG_get_clock(), container, type, val);
@@ -985,7 +985,7 @@ void TRACE_host_push_state(const char* host, const char* state, const char* valu
 void TRACE_host_pop_state (const char *host, const char *state)
 {
   container_t container = PJ_container_get(host);
-  simgrid::instr::Type* type = PJ_type_get(state, container->type);
+  simgrid::instr::Type* type = PJ_type_get(state, container->type_);
   new simgrid::instr::PopStateEvent(MSG_get_clock(), container, type);
 }
 
index 3c92073..c1544f9 100644 (file)
@@ -50,55 +50,55 @@ container_t PJ_container_new(const char* name, simgrid::instr::e_container_types
   container_id++;
 
   container_t newContainer = xbt_new0(simgrid::instr::s_container, 1);
-  newContainer->name = xbt_strdup (name); // name of the container
-  newContainer->id = xbt_strdup (id_str); // id (or alias) of the container
-  newContainer->father = father;
+  newContainer->name_      = xbt_strdup(name);   // name of the container
+  newContainer->id_        = xbt_strdup(id_str); // id (or alias) of the container
+  newContainer->father_    = father;
   sg_host_t sg_host = sg_host_by_name(name);
 
   //Search for network_element_t
   switch (kind){
     case simgrid::instr::INSTR_HOST:
-      newContainer->netpoint = sg_host->pimpl_netpoint;
-      xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
+      newContainer->netpoint_ = sg_host->pimpl_netpoint;
+      xbt_assert(newContainer->netpoint_, "Element '%s' not found", name);
       break;
     case simgrid::instr::INSTR_ROUTER:
-      newContainer->netpoint = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
-      xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
+      newContainer->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
+      xbt_assert(newContainer->netpoint_, "Element '%s' not found", name);
       break;
     case simgrid::instr::INSTR_AS:
-      newContainer->netpoint = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
-      xbt_assert(newContainer->netpoint, "Element '%s' not found", name);
+      newContainer->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
+      xbt_assert(newContainer->netpoint_, "Element '%s' not found", name);
       break;
     default:
-      newContainer->netpoint = nullptr;
+      newContainer->netpoint_ = nullptr;
       break;
   }
 
   // level depends on level of father
-  if (newContainer->father){
-    newContainer->level = newContainer->father->level+1;
-    XBT_DEBUG("new container %s, child of %s", name, father->name);
+  if (newContainer->father_) {
+    newContainer->level_ = newContainer->father_->level_ + 1;
+    XBT_DEBUG("new container %s, child of %s", name, father->name_);
   }else{
-    newContainer->level = 0;
+    newContainer->level_ = 0;
   }
   // type definition (method depends on kind of this new container)
-  newContainer->kind = kind;
-  if (newContainer->kind == simgrid::instr::INSTR_AS) {
+  newContainer->kind_ = kind;
+  if (newContainer->kind_ == simgrid::instr::INSTR_AS) {
     //if this container is of an AS, its type name depends on its level
     char as_typename[INSTR_DEFAULT_STR_SIZE];
-    snprintf (as_typename, INSTR_DEFAULT_STR_SIZE, "L%d", newContainer->level);
-    if (newContainer->father){
-      newContainer->type = simgrid::instr::Type::getOrNull(as_typename, newContainer->father->type);
-      if (newContainer->type == nullptr){
-        newContainer->type = simgrid::instr::Type::containerNew(as_typename, newContainer->father->type);
+    snprintf(as_typename, INSTR_DEFAULT_STR_SIZE, "L%d", newContainer->level_);
+    if (newContainer->father_) {
+      newContainer->type_ = simgrid::instr::Type::getOrNull(as_typename, newContainer->father_->type_);
+      if (newContainer->type_ == nullptr) {
+        newContainer->type_ = simgrid::instr::Type::containerNew(as_typename, newContainer->father_->type_);
       }
     }else{
-      newContainer->type = simgrid::instr::Type::containerNew("0", nullptr);
+      newContainer->type_ = simgrid::instr::Type::containerNew("0", nullptr);
     }
   }else{
     //otherwise, the name is its kind
     char typeNameBuff[INSTR_DEFAULT_STR_SIZE];
-    switch (newContainer->kind){
+    switch (newContainer->kind_) {
       case simgrid::instr::INSTR_HOST:
         snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "HOST");
         break;
@@ -124,31 +124,31 @@ container_t PJ_container_new(const char* name, simgrid::instr::e_container_types
         THROWF (tracing_error, 0, "new container kind is unknown.");
         break;
     }
-    simgrid::instr::Type* type = simgrid::instr::Type::getOrNull(typeNameBuff, newContainer->father->type);
+    simgrid::instr::Type* type = simgrid::instr::Type::getOrNull(typeNameBuff, newContainer->father_->type_);
     if (type == nullptr){
-      newContainer->type = simgrid::instr::Type::containerNew(typeNameBuff, newContainer->father->type);
+      newContainer->type_ = simgrid::instr::Type::containerNew(typeNameBuff, newContainer->father_->type_);
     }else{
-      newContainer->type = type;
+      newContainer->type_ = type;
     }
   }
-  newContainer->children = xbt_dict_new_homogeneous(nullptr);
-  if (newContainer->father){
-    xbt_dict_set(newContainer->father->children, newContainer->name, newContainer, nullptr);
+  newContainer->children_ = xbt_dict_new_homogeneous(nullptr);
+  if (newContainer->father_) {
+    xbt_dict_set(newContainer->father_->children_, newContainer->name_, newContainer, nullptr);
     LogContainerCreation(newContainer);
   }
 
   //register all kinds by name
-  if (xbt_dict_get_or_null(allContainers, newContainer->name) != nullptr){
-    THROWF(tracing_error, 1, "container %s already present in allContainers data structure", newContainer->name);
+  if (xbt_dict_get_or_null(allContainers, newContainer->name_) != nullptr) {
+    THROWF(tracing_error, 1, "container %s already present in allContainers data structure", newContainer->name_);
   }
 
-  xbt_dict_set (allContainers, newContainer->name, newContainer, nullptr);
-  XBT_DEBUG("Add container name '%s'",newContainer->name);
+  xbt_dict_set(allContainers, newContainer->name_, newContainer, nullptr);
+  XBT_DEBUG("Add container name '%s'", newContainer->name_);
 
   //register NODE types for triva configuration
-  if (newContainer->kind == simgrid::instr::INSTR_HOST || newContainer->kind == simgrid::instr::INSTR_LINK ||
-      newContainer->kind == simgrid::instr::INSTR_ROUTER) {
-    trivaNodeTypes.insert(newContainer->type->name);
+  if (newContainer->kind_ == simgrid::instr::INSTR_HOST || newContainer->kind_ == simgrid::instr::INSTR_LINK ||
+      newContainer->kind_ == simgrid::instr::INSTR_ROUTER) {
+    trivaNodeTypes.insert(newContainer->type_->name_);
   }
   return newContainer;
 }
@@ -178,12 +178,10 @@ void PJ_container_remove_from_parent (container_t child)
     THROWF (tracing_error, 0, "can't remove from parent with a nullptr child");
   }
 
-  container_t parent = child->father;
+  container_t parent = child->father_;
   if (parent){
-    XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ",
-        child->name,
-        parent->name);
-    xbt_dict_remove (parent->children, child->name);
+    XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ", child->name_, parent->name_);
+    xbt_dict_remove(parent->children_, child->name_);
   }
 }
 
@@ -192,7 +190,7 @@ void PJ_container_free (container_t container)
   if (container == nullptr){
     THROWF (tracing_error, 0, "trying to free a nullptr container");
   }
-  XBT_DEBUG("destroy container %s", container->name);
+  XBT_DEBUG("destroy container %s", container->name_);
 
   //obligation to dump previous events because they might
   //reference the container that is about to be destroyed
@@ -207,12 +205,12 @@ void PJ_container_free (container_t container)
   }
 
   //remove it from allContainers data structure
-  xbt_dict_remove (allContainers, container->name);
+  xbt_dict_remove(allContainers, container->name_);
 
   //free
-  xbt_free (container->name);
-  xbt_free (container->id);
-  xbt_dict_free (&container->children);
+  xbt_free(container->name_);
+  xbt_free(container->id_);
+  xbt_dict_free(&container->children_);
   xbt_free (container);
   container = nullptr;
 }
@@ -222,11 +220,11 @@ static void recursiveDestroyContainer (container_t container)
   if (container == nullptr){
     THROWF (tracing_error, 0, "trying to recursively destroy a nullptr container");
   }
-  XBT_DEBUG("recursiveDestroyContainer %s", container->name);
+  XBT_DEBUG("recursiveDestroyContainer %s", container->name_);
   xbt_dict_cursor_t cursor = nullptr;
   container_t child;
   char *child_name;
-  xbt_dict_foreach(container->children, cursor, child_name, child) {
+  xbt_dict_foreach (container->children_, cursor, child_name, child) {
     recursiveDestroyContainer (child);
   }
   PJ_container_free (container);
index 8efa88f..a263532 100644 (file)
@@ -76,7 +76,7 @@ void TRACE_paje_dump_buffer (int force)
   }else{
     std::vector<simgrid::instr::PajeEvent*>::iterator i = buffer.begin();
     for (auto const& event : buffer) {
-      double head_timestamp = event->timestamp;
+      double head_timestamp = event->timestamp_;
       if (head_timestamp > TRACE_last_timestamp_to_dump)
         break;
       event->print();
@@ -114,10 +114,10 @@ static void print_timestamp(simgrid::instr::PajeEvent* event)
 {
   stream << " ";
   /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
-  if (event->timestamp < 1e-12)
+  if (event->timestamp_ < 1e-12)
     stream << 0;
   else
-    stream << event->timestamp;
+    stream << event->timestamp_;
 }
 
 /* internal do the instrumentation module */
@@ -130,14 +130,13 @@ static void insert_into_buffer(simgrid::instr::PajeEvent* tbi)
   }
   buffer_debug(&buffer);
 
-  XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)",
-      __FUNCTION__, (int)tbi->event_type, tbi->timestamp, buffer.size());
+  XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)", __FUNCTION__, (int)tbi->eventType_,
+            tbi->timestamp_, buffer.size());
   std::vector<simgrid::instr::PajeEvent*>::reverse_iterator i;
   for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
     simgrid::instr::PajeEvent* e1 = *i;
-    XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1,
-        (int)e1->event_type, e1->timestamp);
-    if (e1->timestamp <= tbi->timestamp)
+    XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1, (int)e1->eventType_, e1->timestamp_);
+    if (e1->timestamp_ <= tbi->timestamp_)
       break;
   }
   if (i == buffer.rend())
@@ -154,8 +153,7 @@ static void insert_into_buffer(simgrid::instr::PajeEvent* tbi)
 
 simgrid::instr::PajeEvent::~PajeEvent()
 {
-  XBT_DEBUG("%s not implemented for %p: event_type=%d, timestamp=%f", __FUNCTION__,
-      this, (int)event_type, timestamp);
+  XBT_DEBUG("%s not implemented for %p: event_type=%d, timestamp=%f", __FUNCTION__, this, (int)eventType_, timestamp_);
 }
 
 void TRACE_paje_start() {
@@ -203,7 +201,7 @@ void DefineContainerEvent(simgrid::instr::Type* type)
               TRACE_precision(), 0.);
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << simgrid::instr::PAJE_DefineContainerType;
-    stream << " " << type->id << " " << type->father->id << " " << type->name;
+    stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -224,9 +222,9 @@ if (instr_fmt_type == instr_fmt_paje) {
             TRACE_precision(), 0.);
   stream << std::fixed << std::setprecision(TRACE_precision());
   stream << simgrid::instr::PAJE_DefineVariableType;
-  stream << " " << type->id << " " << type->father->id << " " << type->name;
-  if (type->color)
-    stream << " \"" << type->color << "\"";
+  stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
+  if (type->color_)
+    stream << " \"" << type->color_ << "\"";
   print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -243,7 +241,7 @@ if (instr_fmt_type == instr_fmt_paje) {
             0.);
   stream << std::fixed << std::setprecision(TRACE_precision());
   stream << simgrid::instr::PAJE_DefineStateType;
-  stream << " " << type->id << " " << type->father->id << " " << type->name;
+  stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
   print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -260,7 +258,7 @@ void LogDefineEventType(simgrid::instr::Type* type)
               TRACE_precision(), 0.);
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << simgrid::instr::PAJE_DefineEventType;
-    stream << " " << type->id << " " << type->father->id << " " << type->name;
+    stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -278,7 +276,8 @@ if (instr_fmt_type == instr_fmt_paje) {
             0.);
   stream << std::fixed << std::setprecision(TRACE_precision());
   stream << simgrid::instr::PAJE_DefineLinkType;
-  stream << " " << type->id << " " << type->father->id << " " << source->id << " " << dest->id << " " << type->name;
+  stream << " " << type->id_ << " " << type->father_->id_ << " " << source->id_ << " " << dest->id_ << " "
+         << type->name_;
   print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -294,9 +293,9 @@ void LogEntityValue(simgrid::instr::Value* val)
 if (instr_fmt_type == instr_fmt_paje) {
     stream << std::fixed << std::setprecision(TRACE_precision());
     stream << simgrid::instr::PAJE_DefineEntityValue;
-    stream << " " << val->id << " " << val->father->id << " " << val->name;
-    if (val->color)
-      stream << " \"" << val->color << "\"";
+    stream << " " << val->id_ << " " << val->father_->id_ << " " << val->name_;
+    if (val->color_)
+      stream << " \"" << val->color_ << "\"";
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -321,8 +320,8 @@ void LogContainerCreation (container_t container)
       stream << 0;
     else
       stream << timestamp;
-    stream << " " << container->id << " " << container->type->id << " " << container->father->id << " \""
-           << container->name << "\"";
+    stream << " " << container->id_ << " " << container->type_->id_ << " " << container->father_->id_ << " \""
+           << container->name_ << "\"";
 
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
@@ -337,7 +336,7 @@ void LogContainerCreation (container_t container)
 
     if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
       char* folder_name = bprintf("%s_files", TRACE_get_filename());
-      char* filename    = bprintf("%s/%f_%s.txt", folder_name, prefix, container->name);
+      char* filename    = bprintf("%s/%f_%s.txt", folder_name, prefix, container->name_);
 #ifdef WIN32
       _mkdir(folder_name);
 #else
@@ -351,7 +350,7 @@ void LogContainerCreation (container_t container)
       xbt_free(filename);
     }
 
-    xbt_dict_set(tracing_files, container->name, (void*)ti_unique_file, nullptr);
+    xbt_dict_set(tracing_files, container->name_, (void*)ti_unique_file, nullptr);
   } else {
     THROW_IMPOSSIBLE;
   }
@@ -372,14 +371,14 @@ void LogContainerDestruction(container_t container)
         stream << 0;
     else
       stream << timestamp;
-    stream << " " << container->type->id << " " << container->id;
+    stream << " " << container->type_->id_ << " " << container->id_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || xbt_dict_length(tracing_files) == 1) {
-      FILE* f = (FILE*)xbt_dict_get_or_null(tracing_files, container->name);
+      FILE* f = (FILE*)xbt_dict_get_or_null(tracing_files, container->name_);
       fclose(f);
     }
-    xbt_dict_remove(tracing_files, container->name);
+    xbt_dict_remove(tracing_files, container->name_);
         } else {
           THROW_IMPOSSIBLE;
         }
@@ -387,13 +386,13 @@ void LogContainerDestruction(container_t container)
 
 simgrid::instr::SetVariableEvent::SetVariableEvent(double timestamp, container_t container, Type* type, double value)
 {
-  this->event_type                         = PAJE_SetVariable;
-  this->timestamp                          = timestamp;
+  this->eventType_ = PAJE_SetVariable;
+  this->timestamp_ = timestamp;
   this->type      = type;
   this->container = container;
   this->value     = value;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -401,11 +400,11 @@ simgrid::instr::SetVariableEvent::SetVariableEvent(double timestamp, container_t
 void simgrid::instr::SetVariableEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << value;
+    stream << " " << type->id_ << " " << container->id_ << " " << value;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -417,13 +416,13 @@ void simgrid::instr::SetVariableEvent::print()
 simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t container, simgrid::instr::Type* type,
                                                    double value)
 {
-  this->event_type                         = PAJE_AddVariable;
-  this->timestamp                          = timestamp;
+  this->eventType_ = PAJE_AddVariable;
+  this->timestamp_ = timestamp;
   this->type      = type;
   this->container = container;
   this->value     = value;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -431,11 +430,11 @@ simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t
 void simgrid::instr::AddVariableEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << value;
+    stream << " " << type->id_ << " " << container->id_ << " " << value;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -446,13 +445,13 @@ void simgrid::instr::AddVariableEvent::print()
 
 simgrid::instr::SubVariableEvent::SubVariableEvent(double timestamp, container_t container, Type* type, double value)
 {
-  this->event_type                         = PAJE_SubVariable;
-  this->timestamp                          = timestamp;
+  this->eventType_ = PAJE_SubVariable;
+  this->timestamp_ = timestamp;
   this->type      = type;
   this->container = container;
   this->value     = value;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -460,11 +459,11 @@ simgrid::instr::SubVariableEvent::SubVariableEvent(double timestamp, container_t
 void simgrid::instr::SubVariableEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << value;
+    stream << " " << type->id_ << " " << container->id_ << " " << value;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -475,8 +474,8 @@ void simgrid::instr::SubVariableEvent::print()
 
 simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, Value* val)
 {
-  this->event_type                      = PAJE_SetState;
-  this->timestamp                       = timestamp;
+  this->eventType_                      = PAJE_SetState;
+  this->timestamp_                      = timestamp;
   this->type      = type;
   this->container = container;
   this->val                             = val;
@@ -489,7 +488,7 @@ simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t conta
   }
 #endif
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -497,12 +496,12 @@ simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t conta
 void simgrid::instr::SetStateEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id;
-    stream << " " << val->id;
+    stream << " " << type->id_ << " " << container->id_;
+    stream << " " << val->id_;
 #if HAVE_SMPI
     if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
       stream << " \"" << filename << "\" " << linenumber;
@@ -519,8 +518,8 @@ void simgrid::instr::SetStateEvent::print()
 simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* val,
                                                void* extra)
 {
-  this->event_type                  = PAJE_PushState;
-  this->timestamp                   = timestamp;
+  this->eventType_                  = PAJE_PushState;
+  this->timestamp_                  = timestamp;
   this->type = type;
   this->container = container;
   this->val                         = val;
@@ -534,7 +533,7 @@ simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t con
   }
 #endif
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -545,12 +544,12 @@ simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t con
 void simgrid::instr::PushStateEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id;
-    stream << " " << val->id;
+    stream << " " << type->id_ << " " << container->id_;
+    stream << " " << val->id_;
 
     if (TRACE_display_sizes()) {
       stream << " ";
@@ -581,12 +580,12 @@ void simgrid::instr::PushStateEvent::print()
 
     char* process_id = nullptr;
     // FIXME: dirty extract "rank-" from the name, as we want the bare process id here
-    if (strstr(container->name, "rank-") == nullptr)
-      process_id = xbt_strdup(container->name);
+    if (strstr(container->name_, "rank-") == nullptr)
+      process_id = xbt_strdup(container->name_);
     else
-      process_id = xbt_strdup(container->name + 5);
+      process_id = xbt_strdup(container->name_ + 5);
 
-    FILE* trace_file = (FILE*)xbt_dict_get(tracing_files, container->name);
+    FILE* trace_file = (FILE*)xbt_dict_get(tracing_files, container->name_);
 
     switch (extra->type) {
       case TRACING_INIT:
@@ -691,7 +690,7 @@ void simgrid::instr::PushStateEvent::print()
       case TRACING_SSEND:
       case TRACING_ISSEND:
       default:
-        XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", val->name);
+        XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", val->name_);
         break;
     }
 
@@ -709,12 +708,12 @@ void simgrid::instr::PushStateEvent::print()
 
 simgrid::instr::PopStateEvent::PopStateEvent(double timestamp, container_t container, Type* type)
 {
-  this->event_type                      = PAJE_PopState;
-  this->timestamp                       = timestamp;
+  this->eventType_ = PAJE_PopState;
+  this->timestamp_ = timestamp;
   this->type      = type;
   this->container = 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)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -722,11 +721,11 @@ simgrid::instr::PopStateEvent::PopStateEvent(double timestamp, container_t conta
 void simgrid::instr::PopStateEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id;
+    stream << " " << type->id_ << " " << container->id_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -737,12 +736,12 @@ void simgrid::instr::PopStateEvent::print()
 
 simgrid::instr::ResetStateEvent::ResetStateEvent(double timestamp, container_t container, Type* type)
 {
-  this->event_type                        = PAJE_ResetState;
-  this->timestamp                         = timestamp;
+  this->eventType_ = PAJE_ResetState;
+  this->timestamp_ = timestamp;
   this->type      = type;
   this->container = 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)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
   delete[] this;
@@ -751,11 +750,11 @@ simgrid::instr::ResetStateEvent::ResetStateEvent(double timestamp, container_t c
 void simgrid::instr::ResetStateEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id;
+    stream << " " << type->id_ << " " << container->id_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -778,8 +777,8 @@ simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t con
                                                container_t sourceContainer, const char* value, const char* key,
                                                int size)
 {
-  event_type                             = PAJE_StartLink;
-  this->timestamp       = timestamp;
+  eventType_            = PAJE_StartLink;
+  this->timestamp_      = timestamp;
   this->type            = type;
   this->container       = container;
   this->sourceContainer = sourceContainer;
@@ -787,8 +786,7 @@ simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t con
   this->key             = xbt_strdup(key);
   this->size            = size;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__,
-      (int)event_type, this->timestamp, this->value);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value);
 
   insert_into_buffer (this);
 }
@@ -796,12 +794,12 @@ simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t con
 void simgrid::instr::StartLinkEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << value;
-    stream << " " << sourceContainer->id << " " << key;
+    stream << " " << type->id_ << " " << container->id_ << " " << value;
+    stream << " " << sourceContainer->id_ << " " << key;
 
     if (TRACE_display_sizes()) {
       stream << " " << size;
@@ -817,15 +815,15 @@ void simgrid::instr::StartLinkEvent::print()
 simgrid::instr::EndLinkEvent::EndLinkEvent(double timestamp, container_t container, Type* type,
                                            container_t destContainer, const char* value, const char* key)
 {
-  this->event_type                         = PAJE_EndLink;
-  this->timestamp                          = timestamp;
+  this->eventType_    = PAJE_EndLink;
+  this->timestamp_    = timestamp;
   this->type          = type;
   this->container     = container;
   this->destContainer = destContainer;
   this->value         = xbt_strdup(value);
   this->key           = xbt_strdup(key);
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -838,12 +836,12 @@ simgrid::instr::EndLinkEvent::~EndLinkEvent()
 void simgrid::instr::EndLinkEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << value;
-    stream << " " << destContainer->id << " " << key;
+    stream << " " << type->id_ << " " << container->id_ << " " << value;
+    stream << " " << destContainer->id_ << " " << key;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
@@ -854,13 +852,13 @@ void simgrid::instr::EndLinkEvent::print()
 
 simgrid::instr::NewEvent::NewEvent(double timestamp, container_t container, Type* type, Value* val)
 {
-  this->event_type                      = PAJE_NewEvent;
-  this->timestamp                       = timestamp;
+  this->eventType_                      = PAJE_NewEvent;
+  this->timestamp_                      = timestamp;
   this->type      = type;
   this->container = container;
   this->val                             = val;
 
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
 
   insert_into_buffer (this);
 }
@@ -868,11 +866,11 @@ simgrid::instr::NewEvent::NewEvent(double timestamp, container_t container, Type
 void simgrid::instr::NewEvent::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__, (int)eventType_, TRACE_precision(), timestamp_);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)this->eventType_;
     print_timestamp(this);
-    stream << " " << type->id << " " << container->id << " " << val->id;
+    stream << " " << type->id_ << " " << container->id_ << " " << val->id_;
     print_row();
   } else if (instr_fmt_type == instr_fmt_TI) {
     /* Nothing to do */
index 2dae959..700a898 100644 (file)
@@ -27,20 +27,20 @@ simgrid::instr::Type::Type(const char* typeNameBuff, const char* key, const char
     THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
   }
 
-  this->name = xbt_strdup (typeNameBuff);
-  this->father = father;
-  this->kind = kind;
-  this->children = xbt_dict_new_homogeneous(nullptr);
-  this->values = xbt_dict_new_homogeneous(nullptr);
-  this->color = xbt_strdup (color);
+  this->name_     = xbt_strdup(typeNameBuff);
+  this->father_   = father;
+  this->kind_     = kind;
+  this->children_ = xbt_dict_new_homogeneous(nullptr);
+  this->values_   = xbt_dict_new_homogeneous(nullptr);
+  this->color_    = xbt_strdup(color);
 
   char str_id[INSTR_DEFAULT_STR_SIZE];
   snprintf (str_id, INSTR_DEFAULT_STR_SIZE, "%lld", instr_new_paje_id());
-  this->id = xbt_strdup (str_id);
+  this->id_ = xbt_strdup(str_id);
 
   if (father != nullptr){
-    xbt_dict_set (father->children, key, this, nullptr);
-    XBT_DEBUG("new type %s, child of %s", typeNameBuff, father->name);
+    xbt_dict_set(father->children_, key, this, nullptr);
+    XBT_DEBUG("new type %s, child of %s", typeNameBuff, father->name_);
   }
 }
 
@@ -49,26 +49,26 @@ void PJ_type_free(simgrid::instr::Type* type)
   simgrid::instr::Value* val;
   char *value_name;
   xbt_dict_cursor_t cursor = nullptr;
-  xbt_dict_foreach (type->values, cursor, value_name, val) {
-    XBT_DEBUG("free value %s, child of %s", val->name, val->father->name);
+  xbt_dict_foreach (type->values_, cursor, value_name, val) {
+    XBT_DEBUG("free value %s, child of %s", val->name_, val->father_->name_);
     xbt_free(val);
   }
-  xbt_dict_free (&type->values);
-  xbt_free (type->name);
-  xbt_free (type->id);
-  xbt_free (type->color);
-  xbt_dict_free (&type->children);
+  xbt_dict_free(&type->values_);
+  xbt_free(type->name_);
+  xbt_free(type->id_);
+  xbt_free(type->color_);
+  xbt_dict_free(&type->children_);
   xbt_free (type);
   type = nullptr;
 }
 
 void recursiveDestroyType(simgrid::instr::Type* type)
 {
-  XBT_DEBUG("recursiveDestroyType %s", type->name);
+  XBT_DEBUG("recursiveDestroyType %s", type->name_);
   xbt_dict_cursor_t cursor = nullptr;
   simgrid::instr::Type* child;
   char *child_name;
-  xbt_dict_foreach(type->children, cursor, child_name, child) {
+  xbt_dict_foreach (type->children_, cursor, child_name, child) {
     recursiveDestroyType (child);
   }
   PJ_type_free(type);
@@ -78,7 +78,7 @@ simgrid::instr::Type* PJ_type_get(const char* name, simgrid::instr::Type* father
 {
   simgrid::instr::Type* ret = simgrid::instr::Type::getOrNull(name, father);
   if (ret == nullptr){
-    THROWF (tracing_error, 2, "type with name (%s) not found in father type (%s)", name, father->name);
+    THROWF(tracing_error, 2, "type with name (%s) not found in father type (%s)", name, father->name_);
   }
   return ret;
 }
@@ -93,8 +93,8 @@ simgrid::instr::Type* simgrid::instr::Type::getOrNull(const char* name, simgrid:
   simgrid::instr::Type* child;
   char *child_name;
   xbt_dict_cursor_t cursor = nullptr;
-  xbt_dict_foreach(father->children, cursor, child_name, child) {
-    if (strcmp (child->name, name) == 0){
+  xbt_dict_foreach (father->children_, cursor, child_name, child) {
+    if (strcmp(child->name_, name) == 0) {
       if (ret != nullptr){
         THROWF (tracing_error, 0, "there are two children types with the same name?");
       }else{
@@ -115,7 +115,7 @@ simgrid::instr::Type* simgrid::instr::Type::containerNew(const char* name, simgr
   if (father == nullptr) {
     rootType = ret;
   } else {
-    XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+    XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
     DefineContainerEvent(ret);
   }
   return ret;
@@ -128,7 +128,7 @@ simgrid::instr::Type* simgrid::instr::Type::eventNew(const char* name, simgrid::
   }
 
   Type* ret = new Type (name, name, nullptr, TYPE_EVENT, father);
-  XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+  XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
   LogDefineEventType(ret);
   return ret;
 }
@@ -148,7 +148,7 @@ simgrid::instr::Type* simgrid::instr::Type::variableNew(const char* name, const
   }else{
     ret = new Type (name, name, color, TYPE_VARIABLE, father);
   }
-  XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+  XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
   LogVariableTypeDefinition (ret);
   return ret;
 }
@@ -162,10 +162,10 @@ simgrid::instr::Type* simgrid::instr::Type::linkNew(const char* name, Type* fath
   Type* ret = nullptr;
 
   char key[INSTR_DEFAULT_STR_SIZE];
-  snprintf (key, INSTR_DEFAULT_STR_SIZE, "%s-%s-%s", name, source->id, dest->id);
+  snprintf(key, INSTR_DEFAULT_STR_SIZE, "%s-%s-%s", name, source->id_, dest->id_);
   ret = new Type (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);
+  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_);
   LogLinkTypeDefinition(ret, source, dest);
   return ret;
 }
@@ -179,7 +179,7 @@ simgrid::instr::Type* simgrid::instr::Type::stateNew(const char* name, Type* fat
   Type* ret = nullptr;
 
   ret = new Type (name, name, nullptr, TYPE_STATE, father);
-  XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+  XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
   LogStateTypeDefinition(ret);
   return ret;
 }
index 8847a5e..066d77f 100644 (file)
@@ -15,18 +15,18 @@ simgrid::instr::Value::Value(const char* name, const char* color, simgrid::instr
   if (name == nullptr || father == nullptr){
     THROWF (tracing_error, 0, "can't create a value with a nullptr name (or a nullptr father)");
   }
-  this->ret         = xbt_new0(Value, 1);
-  this->ret->name = xbt_strdup (name);
-  this->ret->father = father;
-  this->ret->color = xbt_strdup (color);
+  this->ret         = xbt_new0(Value, 1);
+  this->ret_->name_   = xbt_strdup(name);
+  this->ret_->father_ = father;
+  this->ret_->color_  = xbt_strdup(color);
 
   char str_id[INSTR_DEFAULT_STR_SIZE];
   snprintf (str_id, INSTR_DEFAULT_STR_SIZE, "%lld", instr_new_paje_id());
-  this->ret->id = xbt_strdup (str_id);
+  this->ret_->id_ = xbt_strdup(str_id);
 
-  xbt_dict_set (father->values, name, ret, nullptr);
-  XBT_DEBUG("new value %s, child of %s", ret->name, ret->father->name);
-  LogEntityValue(this->ret);
+  xbt_dict_set(father->values_, name, ret_, nullptr);
+  XBT_DEBUG("new value %s, child of %s", ret_->name_, ret_->father_->name_);
+  LogEntityValue(this->ret_);
 };
 
 simgrid::instr::Value::~Value()
@@ -47,7 +47,7 @@ simgrid::instr::Value* simgrid::instr::Value::get_or_new(const char* name, const
   }
   catch(xbt_ex& e) {
     Value rett(name, color, father);
-    ret = rett.ret;
+    ret = rett.ret_;
   }
   return ret;
 }
@@ -58,11 +58,11 @@ simgrid::instr::Value* simgrid::instr::Value::get(const char* name, Type* father
     THROWF (tracing_error, 0, "can't get a value with a nullptr name (or a nullptr father)");
   }
 
-  if (father->kind == TYPE_VARIABLE)
-    THROWF(tracing_error, 0, "variables can't have different values (%s)", father->name);
-  Value* ret = (Value*)xbt_dict_get_or_null(father->values, name);
+  if (father->kind_ == TYPE_VARIABLE)
+    THROWF(tracing_error, 0, "variables can't have different values (%s)", father->name_);
+  Value* ret = (Value*)xbt_dict_get_or_null(father->values_, name);
   if (ret == nullptr) {
-    THROWF(tracing_error, 2, "value with name (%s) not found in father type (%s)", name, father->name);
+    THROWF(tracing_error, 2, "value with name (%s) not found in father type (%s)", name, father->name_);
   }
   return ret;
 }
index 79335b9..5c06071 100644 (file)
@@ -62,14 +62,14 @@ typedef enum {
 
 class Type {
 public:
-  char *id;
-  char *name;
-  char *color;
-
-  e_entity_types kind;
-  Type *father;
-  xbt_dict_t children;
-  xbt_dict_t values; //valid for all types except variable and container
+  char* id_;
+  char* name_;
+  char* color_;
+
+  e_entity_types kind_;
+  Type* father_;
+  xbt_dict_t children_;
+  xbt_dict_t values_; // valid for all types except variable and container
   Type(const char* typeNameBuff, const char* key, const char* color, e_entity_types kind, Type* father);
   static Type* getOrNull(const char* name, Type* father);
   static Type* containerNew(const char* name, Type* father);
@@ -82,12 +82,12 @@ public:
 //--------------------------------------------------
 class Value {
 public:
-  char* id;
-  char* name;
-  char* color;
+  char* id_;
+  char* name_;
+  char* color_;
 
-  Type* father;
-  Value* ret;
+  Type* father_;
+  Value* ret_;
   Value(const char* name, const char* color, Type* father);
   ~Value();
   static Value* get_or_new(const char* name, const char* color, Type* father);
@@ -111,24 +111,24 @@ typedef enum {
 
 class s_container {
   public:
-  sg_netpoint_t netpoint;
-  char *name;     /* Unique name of this container */
-  char *id;       /* Unique id of this container */
-  Type* type;     /* Type of this container */
-  int level;      /* Level in the hierarchy, root level is 0 */
-  e_container_types kind; /* This container is of what kind */
-  s_container *father;
-  xbt_dict_t children;
+    sg_netpoint_t netpoint_;
+    char* name_;             /* Unique name of this container */
+    char* id_;               /* Unique id of this container */
+    Type* type_;             /* Type of this container */
+    int level_;              /* Level in the hierarchy, root level is 0 */
+    e_container_types kind_; /* This container is of what kind */
+    s_container* father_;
+    xbt_dict_t children_;
 };
 
 //--------------------------------------------------
 class PajeEvent {
   public:
-  double timestamp;
-  e_event_type event_type;
-  virtual void print() = 0;
-  void *data;
-  virtual ~PajeEvent();
+    double timestamp_;
+    e_event_type eventType_;
+    virtual void print() = 0;
+    void* data;
+    virtual ~PajeEvent();
 };
 
 //--------------------------------------------------
index 62889c1..bca73a0 100644 (file)
@@ -28,7 +28,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now, const char *vari
   // check if key exists: if it doesn't, set the variable to zero and mark this in the dict
   if (platform_variables.find(key) == platform_variables.end()) {
     container_t container = PJ_container_get (resource);
-    simgrid::instr::Type* type = PJ_type_get(variable, container->type);
+    simgrid::instr::Type* type = PJ_type_get(variable, container->type_);
     new simgrid::instr::SetVariableEvent(now, container, type, 0);
     platform_variables[key] = std::string("");
   }
@@ -36,7 +36,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now, const char *vari
 
 static void instr_event(double now, double delta, simgrid::instr::Type* variable, container_t resource, double value)
 {
-  __TRACE_surf_check_variable_set_to_zero(now, variable->name, resource->name);
+  __TRACE_surf_check_variable_set_to_zero(now, variable->name_, resource->name_);
   new simgrid::instr::AddVariableEvent(now, resource, variable, value);
   new simgrid::instr::SubVariableEvent(now + delta, resource, variable, value);
 }
@@ -54,7 +54,7 @@ void TRACE_surf_link_set_utilization(const char *resource, const char *category,
   if (TRACE_uncategorized()){
     XBT_DEBUG("UNCAT LINK [%f - %f] %s bandwidth_used %f", now, now+delta, resource, value);
     container_t container = PJ_container_get (resource);
-    simgrid::instr::Type* type = PJ_type_get("bandwidth_used", container->type);
+    simgrid::instr::Type* type = PJ_type_get("bandwidth_used", container->type_);
     instr_event (now, delta, type, container, value);
   }
 
@@ -67,7 +67,7 @@ void TRACE_surf_link_set_utilization(const char *resource, const char *category,
     snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "b%s", category);
     XBT_DEBUG("CAT LINK [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
     container_t container = PJ_container_get (resource);
-    simgrid::instr::Type* type = PJ_type_get(category_type, container->type);
+    simgrid::instr::Type* type = PJ_type_get(category_type, container->type_);
     instr_event (now, delta, type, container, value);
   }
 }
@@ -83,7 +83,7 @@ void TRACE_surf_host_set_utilization(const char *resource, const char *category,
   //trace uncategorized host utilization
   if (TRACE_uncategorized()){
     XBT_DEBUG("UNCAT HOST [%f - %f] %s power_used %f", now, now+delta, resource, value);
-    simgrid::instr::Type* type = PJ_type_get("power_used", container->type);
+    simgrid::instr::Type* type = PJ_type_get("power_used", container->type_);
     instr_event (now, delta, type, container, value);
   }
 
@@ -95,7 +95,7 @@ void TRACE_surf_host_set_utilization(const char *resource, const char *category,
     char category_type[INSTR_DEFAULT_STR_SIZE];
     snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "p%s", category);
     XBT_DEBUG("CAT HOST [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
-    simgrid::instr::Type* type = PJ_type_get(category_type, container->type);
+    simgrid::instr::Type* type = PJ_type_get(category_type, container->type_);
     instr_event (now, delta, type, container, value);
   }
 }
index 05ff2d3..9b5fc3b 100644 (file)
@@ -94,7 +94,7 @@ void TRACE_msg_process_suspend(msg_process_t process)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     simgrid::instr::Value* val    = simgrid::instr::Value::get("suspend", type);
     new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
   }
@@ -107,7 +107,7 @@ void TRACE_msg_process_resume(msg_process_t process)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
   }
 }
@@ -119,7 +119,7 @@ void TRACE_msg_process_sleep_in(msg_process_t process)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     simgrid::instr::Value* val    = simgrid::instr::Value::get("sleep", type);
     new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
   }
@@ -132,7 +132,7 @@ void TRACE_msg_process_sleep_out(msg_process_t process)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(process, str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
   }
 }
index f804005..8b35b94 100644 (file)
@@ -53,7 +53,7 @@ void TRACE_msg_task_execute_start(msg_task_t task)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     simgrid::instr::Value* val    = simgrid::instr::Value::get("task_execute", type);
     new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
   }
@@ -68,7 +68,7 @@ void TRACE_msg_task_execute_end(msg_task_t task)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
   }
 }
@@ -93,7 +93,7 @@ void TRACE_msg_task_get_start()
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     simgrid::instr::Value* val    = simgrid::instr::Value::get("receive", type);
     new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
   }
@@ -108,7 +108,7 @@ void TRACE_msg_task_get_end(double start_time, msg_task_t task)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
 
     char key[INSTR_DEFAULT_STR_SIZE];
@@ -128,7 +128,7 @@ int TRACE_msg_task_put_start(msg_task_t task)
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     simgrid::instr::Value* val    = simgrid::instr::Value::get("send", type);
     new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
 
@@ -150,7 +150,7 @@ void TRACE_msg_task_put_end()
     char str[INSTR_DEFAULT_STR_SIZE];
 
     container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
-    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type);
+    simgrid::instr::Type* type    = PJ_type_get("MSG_PROCESS_STATE", process_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
   }
 }
index 0085d14..4c82558 100644 (file)
@@ -187,7 +187,7 @@ void MSG_vm_start(msg_vm_t vm)
   vm->start();
   if (TRACE_msg_vm_is_enabled()) {
     container_t vm_container = PJ_container_get(vm->getCname());
-    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type_);
     simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("start", "0 0 1", type); // start is blue
     new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
   }
@@ -774,7 +774,7 @@ void MSG_vm_suspend(msg_vm_t vm)
 
   if (TRACE_msg_vm_is_enabled()) {
     container_t vm_container = PJ_container_get(vm->getCname());
-    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type_);
     simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("suspend", "1 0 0", type); // suspend is red
     new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
   }
@@ -791,7 +791,7 @@ void MSG_vm_resume(msg_vm_t vm)
 
   if (TRACE_msg_vm_is_enabled()) {
     container_t vm_container = PJ_container_get(vm->getCname());
-    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type);
+    simgrid::instr::Type* type = PJ_type_get("MSG_VM_STATE", vm_container->type_);
     new simgrid::instr::PopStateEvent(MSG_get_clock(), vm_container, type);
   }
 }
index b21edb9..ba34ebd 100644 (file)
@@ -208,8 +208,8 @@ void TRACE_smpi_init(int rank)
      * Check whether this variable already exists or not. Otherwise, it will be created
      * 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);
+    if (s_type::getOrNull(it.first.c_str(), container->type_) == nullptr) {
+      Type::variableNew(it.first.c_str(), nullptr, container->type_);
     }
   }
 #endif
@@ -236,7 +236,7 @@ void TRACE_smpi_collective_in(int rank, const char *operation, instr_extra_data
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   const char *color = instr_find_color (operation);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
@@ -250,7 +250,7 @@ void TRACE_smpi_collective_out(int rank, const char *operation)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
 
   new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
 }
@@ -264,7 +264,7 @@ void TRACE_smpi_computing_init(int rank)
  char str[INSTR_DEFAULT_STR_SIZE];
  smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
  container_t container = PJ_container_get(str);
- simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+ simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
  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));
@@ -281,7 +281,7 @@ void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("computing", nullptr, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -293,7 +293,7 @@ void TRACE_smpi_computing_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
 }
 
@@ -306,7 +306,7 @@ void TRACE_smpi_sleeping_init(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   const char *color = instr_find_color ("sleeping");
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val);
@@ -323,7 +323,7 @@ void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", nullptr, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -335,7 +335,7 @@ void TRACE_smpi_sleeping_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
 }
 
@@ -350,7 +350,7 @@ void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("test", nullptr, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -362,7 +362,7 @@ void TRACE_smpi_testing_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
 }
 
@@ -376,7 +376,7 @@ void TRACE_smpi_ptp_in(int rank, const char *operation, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
   const char *color = instr_find_color (operation);
   simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
   new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
@@ -390,7 +390,7 @@ void TRACE_smpi_ptp_out(int rank, int dst, const char *operation)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type);
+  simgrid::instr::Type* type = PJ_type_get("MPI_STATE", container->type_);
 
   new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
 }
index eb5f17e..7f31041 100644 (file)
@@ -28,23 +28,23 @@ static const char *instr_node_name (xbt_node_t node)
 static container_t lowestCommonAncestor (container_t a1, container_t a2)
 {
   //this is only an optimization (since most of a1 and a2 share the same parent)
-  if (a1->father == a2->father)
-    return a1->father;
+  if (a1->father_ == a2->father_)
+    return a1->father_;
 
   //create an array with all ancestors of a1
   std::vector<container_t> ancestors_a1;
-  container_t p = a1->father;
+  container_t p = a1->father_;
   while (p){
     ancestors_a1.push_back(p);
-    p = p->father;
+    p = p->father_;
   }
 
   //create an array with all ancestors of a2
   std::vector<container_t> ancestors_a2;
-  p = a2->father;
+  p = a2->father_;
   while (p){
     ancestors_a2.push_back(p);
-    p = p->father;
+    p = p->father_;
   }
 
   //find the lowest ancestor
@@ -68,7 +68,7 @@ static container_t lowestCommonAncestor (container_t a1, container_t a2)
 static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
 {
   //ignore loopback
-  if (strcmp (src->name, "__loopback__") == 0 || strcmp (dst->name, "__loopback__") == 0){
+  if (strcmp(src->name_, "__loopback__") == 0 || strcmp(dst->name_, "__loopback__") == 0) {
     XBT_DEBUG ("  linkContainers: ignoring loopback link");
     return;
   }
@@ -83,14 +83,14 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
     //check if we already register this pair (we only need one direction)
     char aux1[INSTR_DEFAULT_STR_SIZE];
     char aux2[INSTR_DEFAULT_STR_SIZE];
-    snprintf (aux1, INSTR_DEFAULT_STR_SIZE, "%s%s", src->name, dst->name);
-    snprintf (aux2, INSTR_DEFAULT_STR_SIZE, "%s%s", dst->name, src->name);
+    snprintf(aux1, INSTR_DEFAULT_STR_SIZE, "%s%s", src->name_, dst->name_);
+    snprintf(aux2, INSTR_DEFAULT_STR_SIZE, "%s%s", dst->name_, src->name_);
     if (xbt_dict_get_or_null (filter, aux1)){
-      XBT_DEBUG ("  linkContainers: already registered %s <-> %s (1)", src->name, dst->name);
+      XBT_DEBUG("  linkContainers: already registered %s <-> %s (1)", src->name_, dst->name_);
       return;
     }
     if (xbt_dict_get_or_null (filter, aux2)){
-      XBT_DEBUG ("  linkContainers: already registered %s <-> %s (2)", dst->name, src->name);
+      XBT_DEBUG("  linkContainers: already registered %s <-> %s (2)", dst->name_, src->name_);
       return;
     }
 
@@ -101,17 +101,15 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
 
   //declare type
   char link_typename[INSTR_DEFAULT_STR_SIZE];
-  snprintf (link_typename, INSTR_DEFAULT_STR_SIZE, "%s-%s%s-%s%s",
-            father->type->name,
-            src->type->name, src->type->id,
-            dst->type->name, dst->type->id);
-  simgrid::instr::Type* link_type = simgrid::instr::Type::getOrNull(link_typename, father->type);
+  snprintf(link_typename, INSTR_DEFAULT_STR_SIZE, "%s-%s%s-%s%s", father->type_->name_, src->type_->name_,
+           src->type_->id_, dst->type_->name_, dst->type_->id_);
+  simgrid::instr::Type* link_type = simgrid::instr::Type::getOrNull(link_typename, father->type_);
   if (link_type == nullptr){
-    link_type = simgrid::instr::Type::linkNew(link_typename, father->type, src->type, dst->type);
+    link_type = simgrid::instr::Type::linkNew(link_typename, father->type_, src->type_, dst->type_);
   }
 
   //register EDGE types for triva configuration
-  trivaEdgeTypes.insert(link_type->name);
+  trivaEdgeTypes.insert(link_type->name_);
 
   //create the link
   static long long counter = 0;
@@ -123,7 +121,7 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
   new simgrid::instr::StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
   new simgrid::instr::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_);
 }
 
 static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t container, xbt_dict_t filter)
@@ -136,7 +134,7 @@ static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t
   if (not netzone->getChildren()->empty()) {
     //bottom-up recursion
     for (auto const& nz_son : *netzone->getChildren()) {
-      container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, nz_son->getCname()));
+      container_t child_container = static_cast<container_t>(xbt_dict_get(container->children_, nz_son->getCname()));
       recursiveGraphExtraction(nz_son, child_container, filter);
     }
   }
@@ -173,9 +171,9 @@ static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
     PJ_container_set_root (root);
 
     if (TRACE_smpi_is_enabled()) {
-      simgrid::instr::Type* mpi = simgrid::instr::Type::getOrNull("MPI", root->type);
+      simgrid::instr::Type* mpi = simgrid::instr::Type::getOrNull("MPI", root->type_);
       if (mpi == nullptr){
-        mpi = simgrid::instr::Type::containerNew("MPI", root->type);
+        mpi = simgrid::instr::Type::containerNew("MPI", root->type_);
         if (not TRACE_smpi_is_grouped())
           simgrid::instr::Type::stateNew("MPI_STATE", mpi);
         simgrid::instr::Type::linkNew("MPI_LINK", PJ_type_get_root(), mpi, mpi);
@@ -214,21 +212,21 @@ static void instr_routing_parse_start_link(simgrid::s4u::Link& link)
   container_t container = PJ_container_new(link.name(), simgrid::instr::INSTR_LINK, father);
 
   if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
-    simgrid::instr::Type* bandwidth = simgrid::instr::Type::getOrNull("bandwidth", container->type);
+    simgrid::instr::Type* bandwidth = simgrid::instr::Type::getOrNull("bandwidth", container->type_);
     if (bandwidth == nullptr) {
-      bandwidth = simgrid::instr::Type::variableNew("bandwidth", nullptr, container->type);
+      bandwidth = simgrid::instr::Type::variableNew("bandwidth", nullptr, container->type_);
     }
-    simgrid::instr::Type* latency = simgrid::instr::Type::getOrNull("latency", container->type);
+    simgrid::instr::Type* latency = simgrid::instr::Type::getOrNull("latency", container->type_);
     if (latency == nullptr) {
-      latency = simgrid::instr::Type::variableNew("latency", nullptr, container->type);
+      latency = simgrid::instr::Type::variableNew("latency", nullptr, container->type_);
     }
     new simgrid::instr::SetVariableEvent(0, container, bandwidth, bandwidth_value);
     new simgrid::instr::SetVariableEvent(0, container, latency, latency_value);
   }
   if (TRACE_uncategorized()) {
-    simgrid::instr::Type* bandwidth_used = simgrid::instr::Type::getOrNull("bandwidth_used", container->type);
+    simgrid::instr::Type* bandwidth_used = simgrid::instr::Type::getOrNull("bandwidth_used", container->type_);
     if (bandwidth_used == nullptr) {
-      simgrid::instr::Type::variableNew("bandwidth_used", "0.5 0.5 0.5", container->type);
+      simgrid::instr::Type::variableNew("bandwidth_used", "0.5 0.5 0.5", container->type_);
     }
   }
 }
@@ -239,33 +237,33 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
   container_t container = PJ_container_new(host.getCname(), simgrid::instr::INSTR_HOST, father);
 
   if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
-    simgrid::instr::Type* speed = simgrid::instr::Type::getOrNull("power", container->type);
+    simgrid::instr::Type* speed = simgrid::instr::Type::getOrNull("power", container->type_);
     if (speed == nullptr){
-      speed = simgrid::instr::Type::variableNew("power", nullptr, container->type);
+      speed = simgrid::instr::Type::variableNew("power", nullptr, container->type_);
     }
 
     double current_speed_state = host.getSpeed();
     new simgrid::instr::SetVariableEvent(0, container, speed, current_speed_state);
   }
   if (TRACE_uncategorized()){
-    simgrid::instr::Type* speed_used = simgrid::instr::Type::getOrNull("power_used", container->type);
+    simgrid::instr::Type* speed_used = simgrid::instr::Type::getOrNull("power_used", container->type_);
     if (speed_used == nullptr){
-      simgrid::instr::Type::variableNew("power_used", "0.5 0.5 0.5", container->type);
+      simgrid::instr::Type::variableNew("power_used", "0.5 0.5 0.5", container->type_);
     }
   }
 
   if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
-    simgrid::instr::Type* mpi = simgrid::instr::Type::getOrNull("MPI", container->type);
+    simgrid::instr::Type* mpi = simgrid::instr::Type::getOrNull("MPI", container->type_);
     if (mpi == nullptr){
-      mpi = simgrid::instr::Type::containerNew("MPI", container->type);
+      mpi = simgrid::instr::Type::containerNew("MPI", container->type_);
       simgrid::instr::Type::stateNew("MPI_STATE", mpi);
     }
   }
 
   if (TRACE_msg_process_is_enabled()) {
-    simgrid::instr::Type* msg_process = simgrid::instr::Type::getOrNull("MSG_PROCESS", container->type);
+    simgrid::instr::Type* msg_process = simgrid::instr::Type::getOrNull("MSG_PROCESS", container->type_);
     if (msg_process == nullptr){
-      msg_process                 = simgrid::instr::Type::containerNew("MSG_PROCESS", container->type);
+      msg_process                 = simgrid::instr::Type::containerNew("MSG_PROCESS", container->type_);
       simgrid::instr::Type* state = simgrid::instr::Type::stateNew("MSG_PROCESS_STATE", msg_process);
       simgrid::instr::Value PJ_value("suspend", "1 0 1", state);
       simgrid::instr::Value::get_or_new("sleep", "1 1 0", state);
@@ -278,9 +276,9 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
   }
 
   if (TRACE_msg_vm_is_enabled()) {
-    simgrid::instr::Type* msg_vm = simgrid::instr::Type::getOrNull("MSG_VM", container->type);
+    simgrid::instr::Type* msg_vm = simgrid::instr::Type::getOrNull("MSG_VM", container->type_);
     if (msg_vm == nullptr){
-      msg_vm                      = simgrid::instr::Type::containerNew("MSG_VM", container->type);
+      msg_vm                      = simgrid::instr::Type::containerNew("MSG_VM", container->type_);
       simgrid::instr::Type* state = simgrid::instr::Type::stateNew("MSG_VM_STATE", msg_vm);
       simgrid::instr::Value PJ_value("suspend", "1 0 1", state);
       simgrid::instr::Value::get_or_new("sleep", "1 1 0", state);
@@ -336,17 +334,17 @@ void instr_routing_define_callbacks ()
  */
 static void recursiveNewVariableType(const char* new_typename, const char* color, simgrid::instr::Type* root)
 {
-  if (not strcmp(root->name, "HOST")) {
+  if (not strcmp(root->name_, "HOST")) {
     char tnstr[INSTR_DEFAULT_STR_SIZE];
     snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
     simgrid::instr::Type::variableNew(tnstr, color, root);
   }
-  if (not strcmp(root->name, "MSG_VM")) {
+  if (not strcmp(root->name_, "MSG_VM")) {
     char tnstr[INSTR_DEFAULT_STR_SIZE];
     snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
     simgrid::instr::Type::variableNew(tnstr, color, root);
   }
-  if (not strcmp(root->name, "LINK")) {
+  if (not strcmp(root->name_, "LINK")) {
     char tnstr[INSTR_DEFAULT_STR_SIZE];
     snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
     simgrid::instr::Type::variableNew(tnstr, color, root);
@@ -354,7 +352,7 @@ static void recursiveNewVariableType(const char* new_typename, const char* color
   xbt_dict_cursor_t cursor = nullptr;
   simgrid::instr::Type* child_type;
   char *name;
-  xbt_dict_foreach(root->children, cursor, name, child_type) {
+  xbt_dict_foreach (root->children_, cursor, name, child_type) {
     recursiveNewVariableType (new_typename, color, child_type);
   }
 }
@@ -367,13 +365,13 @@ void instr_new_variable_type (const char *new_typename, const char *color)
 static void recursiveNewUserVariableType(const char* father_type, const char* new_typename, const char* color,
                                          simgrid::instr::Type* root)
 {
-  if (not strcmp(root->name, father_type)) {
+  if (not strcmp(root->name_, father_type)) {
     simgrid::instr::Type::variableNew(new_typename, color, root);
   }
   xbt_dict_cursor_t cursor = nullptr;
   simgrid::instr::Type* child_type;
   char *name;
-  xbt_dict_foreach(root->children, cursor, name, child_type) {
+  xbt_dict_foreach (root->children_, cursor, name, child_type) {
     recursiveNewUserVariableType (father_type, new_typename, color, child_type);
   }
 }
@@ -385,13 +383,13 @@ void instr_new_user_variable_type  (const char *father_type, const char *new_typ
 
 static void recursiveNewUserStateType(const char* father_type, const char* new_typename, simgrid::instr::Type* root)
 {
-  if (not strcmp(root->name, father_type)) {
+  if (not strcmp(root->name_, father_type)) {
     simgrid::instr::Type::stateNew(new_typename, root);
   }
   xbt_dict_cursor_t cursor = nullptr;
   simgrid::instr::Type* child_type;
   char *name;
-  xbt_dict_foreach(root->children, cursor, name, child_type) {
+  xbt_dict_foreach (root->children_, cursor, name, child_type) {
     recursiveNewUserStateType (father_type, new_typename, child_type);
   }
 }
@@ -404,13 +402,13 @@ void instr_new_user_state_type (const char *father_type, const char *new_typenam
 static void recursiveNewValueForUserStateType(const char* type_name, const char* val, const char* color,
                                               simgrid::instr::Type* root)
 {
-  if (not strcmp(root->name, type_name)) {
+  if (not strcmp(root->name_, type_name)) {
     simgrid::instr::Value PJ_value(val, color, root);
   }
   xbt_dict_cursor_t cursor = nullptr;
   simgrid::instr::Type* child_type;
   char *name;
-  xbt_dict_foreach(root->children, cursor, name, child_type) {
+  xbt_dict_foreach (root->children_, cursor, name, child_type) {
     recursiveNewValueForUserStateType(type_name, val, color, child_type);
   }
 }
@@ -434,7 +432,7 @@ static void recursiveXBTGraphExtraction(xbt_graph_t graph, xbt_dict_t nodes, xbt
     //bottom-up recursion
     for (auto const& netzone_child : *netzone->getChildren()) {
       container_t child_container =
-          static_cast<container_t>(xbt_dict_get(container->children, netzone_child->getCname()));
+          static_cast<container_t>(xbt_dict_get(container->children_, netzone_child->getCname()));
       recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
     }
   }
index f9f14ae..d82ef1b 100644 (file)
@@ -13,7 +13,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);
-    simgrid::instr::Type* type = PJ_type_get("power", container->type);
+    simgrid::instr::Type* type = PJ_type_get("power", container->type_);
     new simgrid::instr::SetVariableEvent(date, container, type, speed);
   }
 }
@@ -22,7 +22,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);
-    simgrid::instr::Type* type = PJ_type_get("bandwidth", container->type);
+    simgrid::instr::Type* type = PJ_type_get("bandwidth", container->type_);
     new simgrid::instr::SetVariableEvent(date, container, type, bandwidth);
   }
 }