From 557c75cf1216e4b9e66ba0a4a8a096f8e8a159ba Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 22 Jul 2021 12:35:38 +0200 Subject: [PATCH] Format delta time to be parsed --- dump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dump.c b/dump.c index d23f5c9..1f7ed52 100644 --- a/dump.c +++ b/dump.c @@ -201,7 +201,7 @@ void emit(struct stream *stream, struct event *ev) delta = ev->clock - stream->lastclock; - printf("%d.%d.%d %c %c % 6u % 6u % 20lu %+15ld ns\n", + printf("%d.%d.%d %c %c % 6u % 6u % 20lu % 15ld\n", stream->loom, stream->proc, stream->tid, ev->fsm, ev->event, ev->a, ev->b, ev->clock, delta); @@ -272,9 +272,10 @@ void dump_events(struct trace *trace) stream = &trace->stream[f]; - if(lastclock >= stream->last.clock) + if(lastclock > stream->last.clock) { - fprintf(stderr, "warning: backwards jump in time\n"); + fprintf(stdout, "warning: backwards jump in time %lu -> %lu\n", + lastclock, stream->last.clock); } /* Emit current event */