From a413f81990af8e4b725d3eb6712b885789a5121e Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 8 Jan 2013 14:53:28 +0100 Subject: [PATCH 1/1] Fix build with tracing=OFF. --- src/simgrid/sg_config.c | 3 --- src/surf/surf.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index c325e2a691..ccf75d13a3 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -345,9 +345,6 @@ void sg_config_init(int *argc, char **argv) int default_value_int; int i; - TRACE_add_start_function(TRACE_surf_alloc); - TRACE_add_end_function(TRACE_surf_release); - /* Create the configuration support */ if (_sg_init_status == 0) { /* Only create stuff if not already inited */ sprintf(description, diff --git a/src/surf/surf.c b/src/surf/surf.c index 254fa765f9..335351e2fe 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -418,6 +418,11 @@ void surf_init(int *argc, char **argv) if (!history) history = tmgr_history_new(); +#ifdef HAVE_TRACING + TRACE_add_start_function(TRACE_surf_alloc); + TRACE_add_end_function(TRACE_surf_release); +#endif + sg_config_init(argc, argv); surf_action_init(); -- 2.20.1