ctf: index: accommodate bug in LTTng tracers
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 14 Jun 2019 13:58:14 +0000 (09:58 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 15:35:50 +0000 (11:35 -0400)
commit1719bf6408b93c67c73b2d1d2c97db64cc8c7968
tree6a1b122a88a0e1edd1b3e84ce95a546c7eaca30e
parentbf012bdeed813d8cb261a630655887080388f465
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.025981 seconds and 4 git commands to generate.