X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmsg-iter%2Fmsg-iter.c;h=537ad1367df9d5676b6dc58095e21a536d87c963;hb=1a8205fbd85f068d9f606eb6d83ecc56f0f4ef14;hp=404119facf12950926482e184bb50f475f0b65df;hpb=6069b85efeb7558d1186ae4f510d316222077fa4;p=babeltrace.git diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.c b/src/plugins/ctf/common/msg-iter/msg-iter.c index 404119fa..537ad136 100644 --- a/src/plugins/ctf/common/msg-iter/msg-iter.c +++ b/src/plugins/ctf/common/msg-iter/msg-iter.c @@ -2550,6 +2550,24 @@ void create_msg_packet_end(struct bt_msg_iter *notit, bt_message **message) } } + /* + * 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;