From: schnorr Date: Tue, 9 Nov 2010 14:30:13 +0000 (+0000) Subject: tracing option to trace uncategorized resource utilization X-Git-Tag: v3_5~322 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6628f256d9dc13c27721bb9846269e5f3c653d3c?ds=sidebyside tracing option to trace uncategorized resource utilization 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 --- diff --git a/src/instr/instr_config.c b/src/instr/instr_config.c index 8d31014c87..87f1540f54 100644 --- a/src/instr/instr_config.c +++ b/src/instr/instr_config.c @@ -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_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" @@ -40,6 +41,11 @@ 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); @@ -96,6 +102,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, diff --git a/src/instr/private.h b/src/instr/private.h index 6ceeade230..97436e13c1 100644 --- a/src/instr/private.h +++ b/src/instr/private.h @@ -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_uncategorized (void); int TRACE_msg_task_is_enabled(void); int TRACE_msg_process_is_enabled(void); int TRACE_msg_volume_is_enabled(void); diff --git a/src/instr/resource_utilization.c b/src/instr/resource_utilization.c index 03c49e292a..06b29698b5 100644 --- a/src/instr/resource_utilization.c +++ b/src/instr/resource_utilization.c @@ -414,8 +414,10 @@ void TRACE_surf_host_set_utilization(const char *name, 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); + } //trace categorized utilization if (!IS_TRACED(surf_action))