Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
graph of platform is always traced if tracing is enabled
[simgrid.git] / src / instr / interface.c
index ac237fc..f08e3ad 100644 (file)
@@ -23,6 +23,10 @@ int TRACE_start()
     return 0;
   }
 
+  if (!TRACE_is_enabled()){
+    return 0;
+  }
+
   if (IS_TRACING) {             /* what? trace is already active... ignore.. */
     THROW0(tracing_error, TRACE_ERROR_START,
            "TRACE_start called, but tracing is already active.");
@@ -48,17 +52,17 @@ int TRACE_start()
   pajeDefineContainerType("PLATFORM", "0", "platform");
   pajeDefineContainerType("HOST", "PLATFORM", "HOST");
   pajeDefineContainerType("LINK", "PLATFORM", "LINK");
+  pajeDefineVariableType("power", "HOST", "power");
+  pajeDefineVariableType("bandwidth", "LINK", "bandwidth");
+  pajeDefineVariableType("latency", "LINK", "latency");
+  pajeDefineEventType("source", "LINK", "source");
+  pajeDefineEventType("destination", "LINK", "destination");
 
   if (IS_TRACING_PLATFORM) {
-    pajeDefineVariableType("power", "HOST", "power");
     if (TRACE_uncategorized()){
       pajeDefineVariableType("power_used", "HOST", "power_used");
       pajeDefineVariableType("bandwidth_used", "LINK", "bandwidth_used");
     }
-    pajeDefineVariableType("bandwidth", "LINK", "bandwidth");
-    pajeDefineVariableType("latency", "LINK", "latency");
-    pajeDefineEventType("source", "LINK", "source");
-    pajeDefineEventType("destination", "LINK", "destination");
   }
 
   if (IS_TRACING_PROCESSES || IS_TRACING_VOLUME) {