ctf: decoding: accommodate barectf `event-before-packet` timestamp quirk
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 26 Jun 2019 22:17:18 +0000 (18:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commit29b36c79255d3a6c1d023b9747e866ddf8a6b7e2
tree293924be61985a8d8b34624add5768e6d6121e9e
parent1a8205fbd85f068d9f606eb6d83ecc56f0f4ef14
ctf: decoding: accommodate barectf `event-before-packet` timestamp quirk

See prior commit titled:
      src.ctf.fs: index: accommodate bug in barectf tracer
for an explanation of the non-compliance of some barectf traces.

How this commit fixes the decoding for the affected traces
==========================================================
When about to emit a packet beginning message, check if the said packet
might be affected by barectf's `event-before-packet` bug by looking at
the version. If it's the case, delay the emission of the packet
beginning message until we decoded the first event of the packet. We
then check if the event is indeed before the packet.
For affected packets, we create packet beginning message using the
timestamp of the first event.

If there is event in the packet, there is nothing to fix so we emit the
packet beginning message when we are about to emit the packet end
message.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ia94e94edef27971c4acf7ab62463c80411ff1978
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1552
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/common/metadata/ctf-meta.h
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/fs-src/fs.c
This page took 0.025057 seconds and 4 git commands to generate.