Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless type aliases.
[simgrid.git] / src / instr / instr_paje_containers.cpp
index 9e5169f..13aa84b 100644 (file)
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
 
-static container_t rootContainer = nullptr;    /* the root container */
-static std::map<std::string, container_t> allContainers; /* all created containers indexed by name */
-
 namespace simgrid {
 namespace instr {
 
+static Container* rootContainer = nullptr;              /* the root container */
+static std::map<std::string, Container*> allContainers; /* all created containers indexed by name */
+
 long long int new_paje_id()
 {
   static long long int type_id = 0;
@@ -91,6 +91,10 @@ Container::~Container()
   // remove me from the allContainers data structure
   allContainers.erase(name_);
 
+  // obligation to dump previous events because they might reference the container that is about to be destroyed
+  last_timestamp_to_dump = SIMIX_get_clock();
+  dump_buffer(true);
+
   on_destruction(*this);
 }