From a2bbf2e560ae184cd17b33cf859c11275918df68 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 27 Oct 2008 21:29:12 +0000 Subject: [PATCH] update git-svn-id: http://ltt.polymtl.ca/svn@3136 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/lttv/ltt/ltt-private.h | 4 +++- trunk/lttv/ltt/tracefile.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/trunk/lttv/ltt/ltt-private.h b/trunk/lttv/ltt/ltt-private.h index 4b2b4a32..357a4cc7 100644 --- a/trunk/lttv/ltt/ltt-private.h +++ b/trunk/lttv/ltt/ltt-private.h @@ -88,11 +88,13 @@ struct ltt_subbuffer_header_2_2 { uint32_t buf_size; /* Size of this subbuffer */ uint32_t events_lost; /* * Events lost in this subbuffer since - * last subbuffer switch. + * the beginning of the trace. + * (may overflow) */ uint32_t subbuf_corrupt; /* * Corrupted (lost) subbuffers since * the begginig of the trace. + * (may overflow) */ char header_end[0]; /* End of header */ }; diff --git a/trunk/lttv/ltt/tracefile.c b/trunk/lttv/ltt/tracefile.c index 7aaf232c..c33e1877 100644 --- a/trunk/lttv/ltt/tracefile.c +++ b/trunk/lttv/ltt/tracefile.c @@ -1387,16 +1387,18 @@ static gint map_block(LttTracefile * tf, guint block_num) tf->event.block = block_num; tf->event.offset = 0; - if (tf->events_lost != header->events_lost) { - g_warning("%d events lost in tracefile %s", + if (header->events_lost) { + g_warning("%d events lost so far in tracefile %s at block %u", tf->events_lost - header->events_lost, - g_quark_to_string(tf->long_name)); + g_quark_to_string(tf->long_name), + block_num); tf->events_lost = header->events_lost; } - if (tf->subbuf_corrupt != header->subbuf_corrupt) { - g_warning("%d subbuffer(s) corrupted in tracefile %s", + if (header->subbuf_corrupt) { + g_warning("%d subbuffer(s) corrupted so far in tracefile %s at block %u", tf->subbuf_corrupt - header->subbuf_corrupt, - g_quark_to_string(tf->long_name)); + g_quark_to_string(tf->long_name), + block_num); tf->subbuf_corrupt = header->subbuf_corrupt; } -- 2.34.1