Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tracing: new configuration option to control if tracing is active or not
[simgrid.git] / src / instr / instr_config.c
index 684b36c..7c26072 100644 (file)
@@ -9,8 +9,11 @@
 
 #ifdef HAVE_TRACING
 
+#define OPT_TRACING               "tracing"
 #define OPT_TRACING_SMPI          "tracing/smpi"
+#define OPT_TRACING_SMPI_GROUP    "tracing/smpi/group"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
+#define OPT_TRACING_UNCATEGORIZED "tracing/uncategorized"
 #define OPT_TRACING_MSG_TASK      "tracing/msg/task"
 #define OPT_TRACING_MSG_PROCESS   "tracing/msg/process"
 #define OPT_TRACING_MSG_VOLUME    "tracing/msg/volume"
 
 static int trace_configured = 0;
 
+int TRACE_is_enabled(void)
+{
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING);
+}
+
 int TRACE_is_configured(void)
 {
   return trace_configured;
@@ -29,11 +37,21 @@ int TRACE_smpi_is_enabled(void)
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
 }
 
+int TRACE_smpi_is_grouped(void)
+{
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_GROUP);
+}
+
 int TRACE_platform_is_enabled(void)
 {
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
 }
 
+int TRACE_uncategorized (void)
+{
+  return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_UNCATEGORIZED);
+}
+
 int TRACE_msg_task_is_enabled(void)
 {
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK);
@@ -68,6 +86,13 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_string, &default_tracing_filename, 1, 1,
                    NULL, NULL);
 
+  /* tracing */
+  int default_tracing = 0;
+  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING,
+                   "Enable Tracing.",
+                   xbt_cfgelm_int, &default_tracing, 0, 1,
+                   NULL, NULL);
+
   /* smpi */
   int default_tracing_smpi = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI,
@@ -75,6 +100,14 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_smpi, 0, 1,
                    NULL, NULL);
 
+  /* smpi grouped */
+  int default_tracing_smpi_grouped = 0;
+  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI_GROUP,
+                   "Group MPI processes by host.",
+                   xbt_cfgelm_int, &default_tracing_smpi_grouped, 0, 1,
+                   NULL, NULL);
+
+
   /* platform */
   int default_tracing_platform = 0;
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM,
@@ -82,6 +115,13 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_platform, 0, 1,
                    NULL, NULL);
 
+  /* tracing uncategorized resource utilization */
+  int default_tracing_uncategorized = 0;
+  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_UNCATEGORIZED,
+                   "Tracing of uncategorized resource (host and link) utilization.",
+                   xbt_cfgelm_int, &default_tracing_uncategorized, 0, 1,
+                   NULL, NULL);
+
   /* platform method */
   char *default_tracing_platform_method = xbt_strdup("b");
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM_METHOD,