add metadata consistency check
[lttv.git] / 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.024029 seconds and 4 git commands to generate.