Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] don't let mark the trace if platform is not traced
[simgrid.git] / src / instr / instr_interface.c
index 713a0e9..f1ff539 100644 (file)
@@ -156,6 +156,9 @@ void TRACE_declare_mark(const char *mark_type)
   /* safe switch */
   if (!TRACE_is_enabled()) return;
 
+  /* if platform is not traced, we don't allow marks */
+  if (!TRACE_needs_platform()) return;
+
   if (!mark_type) return;
 
   //check if mark_type is already declared
@@ -190,6 +193,9 @@ void TRACE_mark(const char *mark_type, const char *mark_value)
   /* safe switch */
   if (!TRACE_is_enabled()) return;
 
+  /* if platform is not traced, we don't allow marks */
+  if (!TRACE_needs_platform()) return;
+
   if (!mark_type || !mark_value) return;
 
   //check if mark_type is already declared