From: schnorr Date: Wed, 7 Apr 2010 12:38:23 +0000 (+0000) Subject: tracing only with the TRACE_PLATFORM mask (for now) X-Git-Tag: SVN~279 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d114f8e4feaf0db10b882650e79a00ee17b9f043?ds=sidebyside tracing only with the TRACE_PLATFORM mask (for now) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7461 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/instr/interface.c b/src/instr/interface.c index 9397e1f463..9cec676286 100644 --- a/src/instr/interface.c +++ b/src/instr/interface.c @@ -37,6 +37,12 @@ int TRACE_start_with_mask(const char *filename, int mask) { return 0; } + /* checking if the mask is good (only TRACE_PLATFORM for now) */ + if (mask != TRACE_PLATFORM){ + THROW0 (tracing_error, TRACE_ERROR_MASK, + "Only TRACE_PLATFORM mask is accepted for now"); + } + FILE *file = fopen(filename, "w"); if (!file) { THROW1 (tracing_error, TRACE_ERROR_FILE_OPEN, @@ -46,7 +52,7 @@ int TRACE_start_with_mask(const char *filename, int mask) { } TRACE_paje_create_header(); - /* default trace is to trace only the platform */ + /* setting the mask */ trace_mask = mask; //check if options are correct @@ -171,7 +177,11 @@ void TRACE_create_category (const char *category, void TRACE_set_mask (int mask) { - trace_mask = mask; + if (mask != TRACE_PLATFORM){ + return; + }else{ + trace_mask = mask; + } } #endif /* HAVE_TRACING */