ctf: index: accommodate bug in barectf tracer
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 14 Jun 2019 16:46:32 +0000 (12:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commit37ea728c4bf5169aa902e451ffae67b495948180
tree81b3c83c807ec8019769a4b4d539d8f60447431c
parentdf7002e4c7d6e9add430b655f30523a6845b0eca
ctf: index: accommodate bug in barectf tracer

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

What makes those traces non-compliant ?
=======================================
A bug in barectf leads to events being emitted with timestamp less than
their packet's `timestamp_begin` field.

At a higher level, such event would appear as before the beginning of
its own containing packet and not within the range of any packet of the
trace.

How this commit fixes the index for the affected traces
=====================================================
For each index entry excluding the first:
  - Decode the packet until the first event and use the timestamp of
    this event as the `timestamp_begin` of this index entry.
  - Set the previous index entry's `timestamp_end` to the
    `timestamp_end` of the current index entry.

Affected versions
=================
  - before barectf 2.3.1

Tracer commit fixing the issue
===============================
barectf master branch: 27bc6f1e6265a0da01d8f1cf2d669f1a1537c47e

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