From: schnorr Date: Mon, 13 Dec 2010 16:45:05 +0000 (+0000) Subject: [trace] tracing a 0 instead of 0.000000 in trace file timestamps X-Git-Tag: v3.6_beta2~727 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ab0e3fc9e5aa2ff2df9fc2a7b458cb111eee0c5b?hp=5d038603f775914afc8c6f35eff53f3682802f5b [trace] tracing a 0 instead of 0.000000 in trace file timestamps git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9196 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/instr/instr_paje.c b/src/instr/instr_paje.c index 351f65dfaa..de8945dba9 100644 --- a/src/instr/instr_paje.c +++ b/src/instr/instr_paje.c @@ -203,16 +203,26 @@ static void __pajeSetState(char *output, int len, int eventid, double time, const char *entityType, const char *container, const char *value) { - snprintf(output, len, "%d %lf %s %s %s", eventid, time, entityType, + if (time == 0){ + snprintf(output, len, "%d 0 %s %s %s", eventid, entityType, + container, value); + }else{ + snprintf(output, len, "%d %lf %s %s %s", eventid, time, entityType, container, value); + } } static void __pajeSetVariable(char *output, int len, int eventid, double time, const char *entityType, const char *container, const char *value) { - snprintf(output, len, "%d %lf %s %s %s", eventid, time, entityType, + if (time == 0){ + snprintf(output, len, "%d 0 %s %s %s", eventid, entityType, + container, value); + }else{ + snprintf(output, len, "%d %lf %s %s %s", eventid, time, entityType, container, value); + } } static void __pajeStartLink(char *output, int len, int eventid, @@ -383,8 +393,13 @@ void pajeSubVariable(double time, const char *entityType, void pajeNewEvent(double time, const char *entityType, const char *container, const char *value) { - fprintf(tracing_file, "%d %lf %s %s %s\n", pajeNewEventId, time, + if (time == 0){ + fprintf(tracing_file, "%d 0 %s %s %s\n", pajeNewEventId, entityType, container, value); + }else{ + fprintf(tracing_file, "%d %lf %s %s %s\n", pajeNewEventId, time, + entityType, container, value); + } } #endif /* HAVE_TRACING */