ctf: index: accommodate bug in LTTng tracers
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 14 Jun 2019 13:58:14 +0000 (09:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commitdf7002e4c7d6e9add430b655f30523a6845b0eca
tree44e8ba289dba5fe52ed61f0382eb01292c83dbdd
parent137723042cfd51e7c289fc96cf93739d83eca634
ctf: index: accommodate bug in LTTng tracers

This commit is to accommodate the indexing of non-compliant CTF traces
produced by LTTng tracers.

What makes those traces non-compliant ?
=======================================
A bug in lttng tracers may lead them to emit events with timestamps that
are greater than the timestamp_end of the their packets.

At a higher level, such event would appear as not within the range of a
packet in the trace.

How this commit fixes the index for the affected traces
=======================================================
For each index entry:
 - If it's the stream file's last packet: set the packet index entry's end
   time to the packet's last event's time by decoding the packet, if
   any, or to the packet's beginning time otherwise.
 - If it's not the stream file's last packet: set the packet index
   entry's end time to the next packet's beginning time.

Affected versions
=================
  - before lttng-ust 2.11.0
  - before lttng-module 2.11.0
  - before lttng-module 2.10.10
  - before lttng-module 2.9.13

Tracer commits fixing the issue
===============================
LTTng-UST master branch: 6c737d0594cac0d969e1948ea1ed55c15be9cec8
LTTng-Modules master branch: 2485a4307679e11711443483a5eb307639f955ed
LTTng-Modules stable-2.10 branch: a1817dcb28265d0f8db10c6bbe98fe8db2c53a8a
LTTng-Modules stable-2.9 branch: 266cef247ceb5d1b4d266a987b8bfcc53d8965ca

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I4c93d05a4e3f85b70657561e9a89cfa2542d49b8
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1420
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/fs-src/fs.c
This page took 0.025458 seconds and 4 git commands to generate.