From: compudj Date: Fri, 12 Oct 2007 12:14:27 +0000 (+0000) Subject: add metadata consistency check X-Git-Tag: v0.12.20~822 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=27c089c13f9a87ca62c6cd9da45369d55b8ddc92;p=lttv.git add metadata consistency check git-svn-id: http://ltt.polymtl.ca/svn@2667 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index f1e5695a..e6e06987 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -2142,6 +2142,16 @@ void ltt_update_event_size(LttTracefile *tf) if (a_event_debug) print_debug_event_data(&tf->event); + /* Having a marker load or marker format event out of the facilities + * tracefiles is a serious bug. */ + switch((enum marker_id)tf->event.event_id) { + case MARKER_ID_SET_MARKER_ID: + case MARKER_ID_SET_MARKER_FORMAT: + if (tf->name != g_quark_from_string("/control/facilities")) + g_error("Trace inconsistency : metadata event found in data " + "tracefile %s", g_quark_to_string(tf->long_name)); + } + if (tf->event.data_size != tf->event.event_size) { struct marker_info *info = marker_get_info_from_id(tf->trace, tf->event.event_id);