add metadata consistency check
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 12:14:27 +0000 (12:14 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 12 Oct 2007 12:14:27 +0000 (12:14 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2667 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/tracefile.c

index f1e5695ac50294dfc4dc3e331db298c25dda2874..e6e06987feafcfe3fabf975894c84e89f202086a 100644 (file)
@@ -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);
This page took 0.025673 seconds and 4 git commands to generate.