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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 Jun 2019 21:20:55 +0000 (17:20 -0400)
commit7ed5243afe12c7c12fa5305fff99b93ad23bbdff
treeeb481ae6deb6ac843d57f904cb7de42237353ae3
parent54ef52bdb98b7f56817f3d401aa38d6bffcd1fe6
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.024489 seconds and 4 git commands to generate.