Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] pay attention to configuration options when tracing
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:44:43 +0000 (16:44 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:44:43 +0000 (16:44 +0000)
detail:
- not defining the parser callbacks means that instr_routing.c does nothing

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

src/instr/instr_routing.c

index c48bbc5..7f05ce8 100644 (file)
@@ -76,6 +76,8 @@ static void newVariableType (const char *type, const char *parentType, const cha
 
 void instr_routing_define_callbacks ()
 {
+  if (!TRACE_is_active())
+    return;
   surfxml_add_callback(STag_surfxml_AS_cb_list, &instr_routing_parse_start_AS);
   surfxml_add_callback(ETag_surfxml_AS_cb_list, &instr_routing_parse_end_AS);
   surfxml_add_callback(STag_surfxml_link_cb_list, &instr_routing_parse_start_link);