Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename C++ only header files from .h to .hpp.
[simgrid.git] / src / instr / instr_config.cpp
index b0640bb..e6f06de 100644 (file)
@@ -3,7 +3,7 @@
 /* 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 "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
 #include "surf/surf.h"
 #include <string>
 #include <vector>
@@ -138,13 +138,12 @@ int TRACE_end()
     TRACE_generate_viva_cat_conf();
 
     /* dump trace buffer */
-    simgrid::instr::TRACE_last_timestamp_to_dump = surf_get_clock();
+    TRACE_last_timestamp_to_dump = surf_get_clock();
     TRACE_paje_dump_buffer(1);
 
     /* destroy all data structures of tracing (and free) */
-    PJ_container_free_all();
-    recursiveDestroyType (PJ_type_get_root());
-    PJ_container_release();
+    delete PJ_container_get_root();
+    delete PJ_type_get_root();
     rootType = nullptr;
 
     /* close the trace files */
@@ -480,9 +479,9 @@ static void output_types (const char *name, xbt_dynar_t types, FILE *file)
 
 static void output_categories(const char* name, FILE* file)
 {
-  unsigned int i = simgrid::instr::created_categories.size();
+  unsigned int i = created_categories.size();
   fprintf (file, "    values = (");
-  for (auto const& cat : simgrid::instr::created_categories) {
+  for (auto const& cat : created_categories) {
     --i;
     fprintf(file, "\"%s%s\"", name, cat.c_str());
     if (i > 0) {
@@ -560,7 +559,7 @@ static void generate_cat_configuration (const char *output, const char *name, in
 {
   if (output && strlen(output) > 0){
     //check if we do have categories declared
-    if (simgrid::instr::created_categories.empty()) {
+    if (created_categories.empty()) {
       XBT_INFO("No categories declared, ignoring generation of %s graph configuration", name);
       return;
     }