}
}
+ /*
+ * Check if may be affected by lttng event-after-packet `timestamp_end`
+ * quirk.
+ */
+ if (notit->meta.tc->quirks.lttng_event_after_packet) {
+ /*
+ * Check if `timestamp_end` is smaller then the current
+ * default_clock_snapshot (which is set to the last event
+ * decoded). It means the trace is affected by the lttng
+ * `event-after-packet` packet `timestamp_end` quirk and must
+ * be fixed up by omitting to update the default clock snapshot
+ * to the `timestamp_end` as is typically done.
+ */
+ if (notit->snapshots.end_clock < notit->default_clock_snapshot) {
+ update_default_cs = false;
+ }
+ }
+
/* Update default clock from packet's end time. */
if (notit->snapshots.end_clock != UINT64_C(-1) && update_default_cs) {
notit->default_clock_snapshot = notit->snapshots.end_clock;
BT_LOGE_STR("Failed to fix LTTng event-after-packet bug.");
goto end;
}
+ trace->metadata->tc->quirks.lttng_event_after_packet = true;
}
if (is_tracer_affected_by_barectf_event_before_packet_bug(