Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify link events and rename getRootContainer to getRoot
[simgrid.git] / src / instr / instr_config.cpp
index 0ab998e..5333849 100644 (file)
@@ -63,8 +63,6 @@ static int trace_precision;
 static bool trace_configured = false;
 static bool trace_active     = false;
 
-static simgrid::instr::Type* rootType = nullptr; /* the root type */
-
 instr_fmt_type_t instr_fmt_type = instr_fmt_paje;
 
 static void TRACE_getopts()
@@ -141,10 +139,10 @@ int TRACE_end()
     TRACE_last_timestamp_to_dump = surf_get_clock();
     TRACE_paje_dump_buffer(true);
 
+    simgrid::instr::Type* root_type = simgrid::instr::Container::getRoot()->type_;
     /* destroy all data structures of tracing (and free) */
-    delete simgrid::instr::Container::getRootContainer();
-    delete simgrid::instr::Type::getRootType();
-    rootType = nullptr;
+    delete simgrid::instr::Container::getRoot();
+    delete root_type;
 
     /* close the trace files */
     const char* format = xbt_cfg_get_string(OPT_TRACING_FORMAT);