Fix: consider index of all files for data stream groups with multiple files
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 16 Oct 2019 21:21:09 +0000 (17:21 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 18 Oct 2019 19:05:14 +0000 (15:05 -0400)
commitce75de140f82187fdaabd19e74a90baa797b8980
tree92696f3f3cbadeb7fc31313145b534ff12946a4f
parent5687169de2cc1be50ede9a64a3cb3c8ba429cff9
Fix: consider index of all files for data stream groups with multiple files

The indexes associated to data stream file groups (dsfg) with multiple
files are incorrect.

The first time we process a file for a given dsfg, the group is created
using the index of that file.  Up to that point, it's fine.  When
processing the other files for that dsfg, the index is never used.  The
result is that the index for that dsfg only covers the time range of the
first file that was parsed, instead of the whole data stream.

Fix it by merging the index of the added file in
add_ds_file_to_ds_file_group, in the case where we add the file to an
existing group.

A test is added for this, in the form of a trace infos query.  The
implementation of this query uses the index data directly.

Change-Id: If1afd68be347210d1e258f8115b50547bc773760
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2212
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
29 files changed:
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/fs-src/fs.h
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/README [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_3_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_3_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_3_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_3_1 [new file with mode: 0644]
tests/data/plugins/src.ctf.fs/succeed/trace-lttng-tracefile-rotation.expect [new file with mode: 0644]
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
tests/plugins/src.ctf.fs/succeed/test_succeed
This page took 0.025647 seconds and 4 git commands to generate.