Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] tracing a 0 instead of 0.000000 in trace file timestamps
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:45:05 +0000 (16:45 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:45:05 +0000 (16:45 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9196 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/instr/instr_paje.c

index 351f65d..de8945d 100644 (file)
@@ -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 */