src.ctf.fs: remove uneeded check in create_streams_for_trace
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 9 Jun 2022 17:52:02 +0000 (13:52 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 17 Apr 2024 17:57:53 +0000 (13:57 -0400)
commitf0940b019844bc5d4dcfc0e32f90c324a366d3d5
tree5173a1929c75650f9acf40fad19f7121bad9324a
parent69d91bb3186150ec12143cbed0a6502a928aab5b
src.ctf.fs: remove uneeded check in create_streams_for_trace

At this point, we certainly have a stream class.

The ir_sc field is set in ctf_stream_class_to_ir.
ctf_stream_class_to_ir is called by ctf_trace_class_translate, which is
called by ctf_visitor_generate_ir_visit_node if ctx->trace_class is set.
That trace_class field is set if a self_comp was passed to
ctf_visitor_generate_ir_create, in the decoder_config object.  Going up
the stack, we get to ctf_fs_metadata_set_trace_class, called by
ctf_fs_trace_create, called by ctf_fs_component_create_ctf_fs_trace.

create_streams_for_trace is called by ctf_fs_trace_create, which always
passes a self_comp to ctf_fs_component_create_ctf_fs_trace, ensuring we
always end up with a stream class.

ctf_fs_component_create_ctf_fs_trace is also used in the context of
queries, where no self_comp if passed, and therefore no stream class is
created..  But in that context, create_streams_for_trace is not called.

Change-Id: I5e8ef72a1013fc156a7bc6ac0d4cbb231a5ab704
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8237
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12274
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/fs-src/fs.cpp
This page took 0.023895 seconds and 4 git commands to generate.