Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tracing option to trace uncategorized resource utilization
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 9 Nov 2010 14:30:13 +0000 (14:30 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 9 Nov 2010 14:30:13 +0000 (14:30 +0000)
details:
- default is 0
- so if categories are not needed, have to set tracing/uncategorized:1
to get resource utilization traces for the simulation

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8505 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/instr/instr_config.c
src/instr/private.h
src/instr/resource_utilization.c

index 8d31014..87f1540 100644 (file)
@@ -12,6 +12,7 @@
 #define OPT_TRACING_SMPI          "tracing/smpi"
 #define OPT_TRACING_SMPI_GROUP    "tracing/smpi/group"
 #define OPT_TRACING_PLATFORM      "tracing/platform"
 #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"
 #define OPT_TRACING_MSG_TASK      "tracing/msg/task"
 #define OPT_TRACING_MSG_PROCESS   "tracing/msg/process"
 #define OPT_TRACING_MSG_VOLUME    "tracing/msg/volume"
@@ -40,6 +41,11 @@ int TRACE_platform_is_enabled(void)
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
 }
 
   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);
 int TRACE_msg_task_is_enabled(void)
 {
   return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK);
@@ -96,6 +102,13 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_platform, 0, 1,
                    NULL, NULL);
 
                    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,
   /* platform method */
   char *default_tracing_platform_method = xbt_strdup("b");
   xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM_METHOD,
index 6ceeade..97436e1 100644 (file)
@@ -170,6 +170,7 @@ int TRACE_is_configured(void);
 int TRACE_smpi_is_enabled(void);
 int TRACE_smpi_is_grouped(void);
 int TRACE_platform_is_enabled(void);
 int TRACE_smpi_is_enabled(void);
 int TRACE_smpi_is_grouped(void);
 int TRACE_platform_is_enabled(void);
+int TRACE_uncategorized (void);
 int TRACE_msg_task_is_enabled(void);
 int TRACE_msg_process_is_enabled(void);
 int TRACE_msg_volume_is_enabled(void);
 int TRACE_msg_task_is_enabled(void);
 int TRACE_msg_process_is_enabled(void);
 int TRACE_msg_volume_is_enabled(void);
index 03c49e2..06b2969 100644 (file)
@@ -414,8 +414,10 @@ void TRACE_surf_host_set_utilization(const char *name,
     return;
 
   //trace uncategorized host utilization
     return;
 
   //trace uncategorized host utilization
-  TRACE_surf_resource_utilization_event(smx_action, now, delta,
+  if (TRACE_uncategorized()){
+    TRACE_surf_resource_utilization_event(smx_action, now, delta,
                                         "power_used", name, value);
                                         "power_used", name, value);
+  }
 
   //trace categorized utilization
   if (!IS_TRACED(surf_action))
 
   //trace categorized utilization
   if (!IS_TRACED(surf_action))