Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate SIMIX_get_clock().
[simgrid.git] / src / instr / instr_config.cpp
index 11dce17..a8df9b1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -24,7 +24,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 
 std::ofstream tracing_file;
 std::map<const simgrid::instr::Container*, std::ofstream*> tracing_files; // TI specific
-double prefix = 0.0;                                 // TI specific
 
 constexpr char OPT_TRACING_BASIC[]             = "tracing/basic";
 constexpr char OPT_TRACING_COMMENT_FILE[]      = "tracing/comment-file";
@@ -73,8 +72,8 @@ static simgrid::config::Flag<bool> trace_uncategorized{
     "To use if the simulator does not use tracing categories but resource utilization have to be traced.",
     false};
 
-static simgrid::config::Flag<bool> trace_disable_destroy{
-    OPT_TRACING_DISABLE_DESTROY, {"tracing/disable_destroy"}, "Disable platform containers destruction.", false};
+static simgrid::config::Flag<bool> trace_disable_destroy{OPT_TRACING_DISABLE_DESTROY,
+                                                         "Disable platform containers destruction.", false};
 static simgrid::config::Flag<bool> trace_basic{OPT_TRACING_BASIC, "Avoid extended events (impoverished trace file).",
                                                false};
 
@@ -228,7 +227,7 @@ xbt::signal<void(EntityValue const&)> EntityValue::on_creation;
 
 static void on_container_creation_paje(const Container& c)
 {
-  double timestamp = SIMIX_get_clock();
+  double timestamp = simgrid_get_clock();
   std::stringstream stream;
 
   XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, static_cast<unsigned>(PajeEventType::CreateContainer),
@@ -251,7 +250,7 @@ static void on_container_destruction_paje(const Container& c)
   // trace my destruction, but not if user requests so or if the container is root
   if (not trace_disable_destroy && &c != Container::get_root()) {
     std::stringstream stream;
-    double timestamp = SIMIX_get_clock();
+    double timestamp = simgrid_get_clock();
 
     XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, static_cast<unsigned>(PajeEventType::DestroyContainer),
               timestamp);
@@ -266,9 +265,10 @@ static void on_container_destruction_paje(const Container& c)
 static void on_container_creation_ti(const Container& c)
 {
   XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, static_cast<unsigned>(PajeEventType::CreateContainer),
-            SIMIX_get_clock());
+            simgrid_get_clock());
   // if we are in the mode with only one file
   static std::ofstream* ti_unique_file = nullptr;
+  static double prefix                 = 0.0;
 
   if (tracing_files.empty()) {
     // generate unique run id with time
@@ -456,11 +456,9 @@ void init()
 
   config::declare_flag<bool>(OPT_TRACING_FORMAT_TI_ONEFILE,
                              "(smpi only) For replay format only : output to one file only", false);
-  config::alias(OPT_TRACING_FORMAT_TI_ONEFILE, {"tracing/smpi/format/ti_one_file"});
   config::declare_flag<std::string>("tracing/comment", "Add a comment line to the top of the trace file.", "");
   config::declare_flag<std::string>(OPT_TRACING_COMMENT_FILE,
                                     "Add the contents of a file as comments to the top of the trace.", "");
-  config::alias(OPT_TRACING_COMMENT_FILE, {"tracing/comment_file"});
   config::declare_flag<int>("tracing/precision",
                             "Numerical precision used when timestamping events "
                             "(expressed in number of digits after decimal point)",