Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] don't let mark the trace if platform is not traced
authorschnorr <Lucas.Schnorr@imag.fr>
Wed, 13 Jun 2012 16:07:47 +0000 (18:07 +0200)
committerschnorr <Lucas.Schnorr@imag.fr>
Thu, 14 Jun 2012 12:37:29 +0000 (14:37 +0200)
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