]> AND Public Git Repository - simgrid.git/blobdiff - src/instr/instr_config.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] faster method to dump when unconditional dump to trace file is possible
[simgrid.git] / src / instr / instr_config.c
index 08474b4ce17f8b1b4ed743cad8bacd4b445baa88..67c7d50b2ebb62d654cf013294a08b8d50d2b952 100644 (file)
@@ -71,7 +71,7 @@ int TRACE_end()
 
   /* dump trace buffer */
   TRACE_last_timestamp_to_dump = surf_get_clock();
-  TRACE_paje_dump_buffer();
+  TRACE_paje_dump_buffer(1);
 
   /* destroy all data structures of tracing (and free) */
   destroyAllContainers();
@@ -115,7 +115,8 @@ int TRACE_is_configured(void)
 
 int TRACE_smpi_is_enabled(void)
 {
-  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI) &&
+      TRACE_is_enabled();
 }
 
 int TRACE_smpi_is_grouped(void)
@@ -135,17 +136,20 @@ int TRACE_uncategorized (void)
 
 int TRACE_msg_task_is_enabled(void)
 {
-  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK);
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK) &&
+      TRACE_is_enabled();
 }
 
 int TRACE_msg_process_is_enabled(void)
 {
-  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_PROCESS);
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_PROCESS) &&
+      TRACE_is_enabled();
 }
 
 int TRACE_msg_volume_is_enabled(void)
 {
-  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_VOLUME);
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_VOLUME) &&
+      TRACE_is_enabled();
 }
 
 char *TRACE_get_filename(void)