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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 15:35:50 +0000 (11:35 -0400)
commit1eb289076eed1e36fa2c7256f504fb22f40f9f7c
tree71c53b8ab71b23688e7b3efca3cb5a434c9b9e7f
parent7d1ac606018744f051104fc184e581411c52bd3d
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.026455 seconds and 4 git commands to generate.