> [4.214759] [msg_test/INFO] Declared marks:
> [4.214759] [msg_test/INFO] msmark
+p Tracing master/slave application with xml config
+$ $SG_TEST_EXENV ${bindir:=.}/tracing/ms$EXEEXT ${srcdir:=.}/tracing/platform-config.xml ${srcdir:=.}/tracing/deployment.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/uncategorized' to 'yes'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/buffer' to 'yes'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/categorized' to 'tracing/msx.cat.plist'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'tracing/msx.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/uncategorized' to 'tracing/msx.uncat.plist'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
+> [4.214759] [msg_test/INFO] Declared tracing categories:
+> [4.214759] [msg_test/INFO] request
+> [4.214759] [msg_test/INFO] finalize
+> [4.214759] [msg_test/INFO] report
+> [4.214759] [msg_test/INFO] compute
+> [4.214759] [msg_test/INFO] Declared marks:
+> [4.214759] [msg_test/INFO] msmark
+
p Not tracing master/slave application
$ $SG_TEST_EXENV ${bindir:=.}/tracing/ms$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
$ $SG_TEST_EXENV cat tracing/ms.uncat.plist
> node = ("HOST","LINK");
> edge = ("0-LINK13-LINK13","0-LINK13-HOST1","0-HOST1-LINK13");
->
+>
> host = {
> type = "square";
> size = "power";
$ $SG_TEST_EXENV cat tracing/ms.cat.plist
> node = ("HOST","LINK");
> edge = ("0-LINK13-LINK13","0-LINK13-HOST1","0-HOST1-LINK13");
->
+>
> host = {
> type = "square";
> size = "power";
#define OPT_TRACING_DISABLE_LINK "tracing/disable_link"
#define OPT_TRACING_DISABLE_POWER "tracing/disable_power"
-static int trace_enabled;
+static int trace_enabled = 0;
static int trace_platform;
static int trace_platform_topology;
static int trace_smpi_enabled;
int TRACE_start()
{
- TRACE_getopts();
+ if (TRACE_is_configured())
+ TRACE_getopts();
// tracing system must be:
// - enabled (with --cfg=tracing:yes)
// - already configured (TRACE_global_init already called)
- if (TRACE_is_enabled() && TRACE_is_configured()) {
+ if (TRACE_is_enabled()) {
+
XBT_DEBUG("Tracing starts");
/* init the tracing module to generate the right output */
MC_ignore_heap(&(msg_global->sent_msg), sizeof(msg_global->sent_msg));
}
-#ifdef HAVE_TRACING
- TRACE_start();
-#endif
-
XBT_DEBUG("ADD MSG LEVELS");
MSG_HOST_LEVEL = xbt_lib_add_level(host_lib, (void_f_pvoid_t) __MSG_host_priv_free);
MSG_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, (void_f_pvoid_t) __MSG_storage_destroy);
xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model",
"ptask_L07");
-#ifdef HAVE_TRACING
- TRACE_start ();
-#endif
-
#ifdef HAVE_JEDULE
jedule_sd_init();
#endif
//It seems that the request is used after the call there this should
//be free somewhereelse but where???
//xbt_free(comm->comm.src_data);// inside SMPI the request is keep
- //inside the user data and should be free
+ //inside the user data and should be free
comm->comm.src_buff = NULL;
}
SIMIX_global_init(&argc, argv);
-#ifdef HAVE_TRACING
- TRACE_start();
-#endif
-
// parse the platform file: get the host list
SIMIX_create_environment(argv[1]);
*/
XBT_PUBLIC(void) surfxml_bufferstack_push(int _new);
XBT_PUBLIC(void) surfxml_bufferstack_pop(int _new);
+XBT_PUBLIC(void) parse_after_config(void);
XBT_PUBLIC_DATA(int) surfxml_bufferstack_size;
void STag_surfxml_include(void)
{
+ parse_after_config();
XBT_DEBUG("STag_surfxml_include '%s'",A_surfxml_include_file);
xbt_dynar_push(surf_parsed_filename_stack,&surf_parsed_filename); // save old file name
surf_parsed_filename = xbt_strdup(A_surfxml_include_file);
cluster.availability_trace = A_surfxml_cluster_availability___file;
cluster.state_trace = A_surfxml_cluster_state___file;
sg_platf_new_cluster(&cluster);
-
+
current_property_set = NULL;
}
-void STag_surfxml_cluster(void){
+void STag_surfxml_cluster(void){
+ parse_after_config();
xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
}
void STag_surfxml_cabinet(void){
+ parse_after_config();
s_sg_platf_cabinet_cbarg_t cabinet;
memset(&cabinet,0,sizeof(cabinet));
cabinet.id = A_surfxml_cabinet_id;
}
void STag_surfxml_peer(void){
+ parse_after_config();
s_sg_platf_peer_cbarg_t peer;
memset(&peer,0,sizeof(peer));
peer.id = A_surfxml_peer_id;
}
void STag_surfxml_trace___connect(void){
+ parse_after_config();
s_sg_platf_trace_connect_cbarg_t trace_connect;
memset(&trace_connect,0,sizeof(trace_connect));
}
void STag_surfxml_AS(void){
+ parse_after_config();
AS_TAG = 1;
s_sg_platf_AS_cbarg_t AS = SG_PLATF_AS_INITIALIZER;
AS.id = A_surfxml_AS_id;
free(cfg);
}
XBT_DEBUG("End configuration name = %s",A_surfxml_config_id);
+
xbt_dict_free(¤t_property_set);
current_property_set = NULL;
}
void STag_surfxml_random(void){}
void ETag_surfxml_random(void){}
void ETag_surfxml_trace___connect(void){}
-void STag_surfxml_trace(void){}
+void STag_surfxml_trace(void){parse_after_config();}
void ETag_surfxml_router(void){}
void ETag_surfxml_host___link(void){}
void ETag_surfxml_cabinet(void){}
}
/* ***************************************** */
+static int after_config_done;
+void parse_after_config() {
+ if (!after_config_done) {
+ //
+ #ifdef HAVE_TRACING
+ TRACE_start();
+ #endif
+
+ /* Register classical callbacks */
+ storage_register_callbacks();
+ routing_register_callbacks();
+
+ /* ***************************************** */
+ /* TUTORIAL: New TAG */
+ gpu_register_callbacks();
+ /* ***************************************** */
+ after_config_done = 1;
+ }
+}
/* This function acts as a main in the parsing area. */
void parse_platform_file(const char *file)
surf_parse_init_callbacks();
- /* Register classical callbacks */
- storage_register_callbacks();
- routing_register_callbacks();
-
- /* ***************************************** */
- /* TUTORIAL: New TAG */
- gpu_register_callbacks();
- /* ***************************************** */
-
/* init the flex parser */
surfxml_buffer_stack_stack_ptr = 1;
surfxml_buffer_stack_stack[0] = 0;
-
+ after_config_done = 0;
surf_parse_open(file);
/* Init my data */