src.ctf.fs: merge all indexes to the fs_ds_group level
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 15 May 2019 18:59:10 +0000 (14:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commit779f4a239016a76cc2fc3ecc1426d8498a536c12
treed4b2ab599a64189c7676ce983e44b9981186a9c3
parentf80e93448aa922cda7e5c4717ef4e3e3c2136f86
src.ctf.fs: merge all indexes to the fs_ds_group level

Background
==========
The index contains information on the packets of the underlying CTF
trace (e.g. timestamp begin and end). It is currently used to compute
the time boundaries of the all streams during the `trace-info` query. It
will probably be used for seeking in the future. Currently, each
datastream file has its own index.

To find the time boundaries of a given stream, we need to get the first
entry of the first datastream file and the last entry of the last
datastream file.

Why merge all the indexes ?
===========================
There are two reasons why we want to merge the file indexes into a
single stream index:
* It's slightly simpler to extract the time boundaries of the stream.

* Changes to overcome various packet timestamps tracer bugs are about to
  be introduced and will need to iterate over all sorted index entries of
  each stream.

Approach
========
Move the index from `struct ctf_fs_ds_file_info` to
`struct ctf_fs_ds_file_group` and merge the indexes of a given stream
when merging the different chunks of the same trace.

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