ctf: save self_msg_iter in ctf_msg_iter when creating it
authorSimon Marchi <simon.marchi@efficios.com>
Sun, 3 Nov 2019 02:09:50 +0000 (22:09 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 4 Nov 2019 19:21:39 +0000 (14:21 -0500)
commit851de941fc0cdea645b905098fb8f2a61dfdd161
tree360797bb10737be4a7733da168c06261ee758b26
parent18a1979b5eae4e700e0e6716d83ca909f508d3e0
ctf: save self_msg_iter in ctf_msg_iter when creating it

I find it strange that we assign ctf_msg_iter::self_msg_iter in
ctf_msg_iter_get_next_message.  The self_msg_iter associated to the
ctf_msg_iter is the same throughout its lifetime, and known at creation
time, so we can assign it once at creation time.

This patch adds a self_msg_iter to ctf_msg_iter_create to do that.  It
also removes the self_msg_iter parameter from
ctf_msg_iter_get_next_message, since it is not needed anymore.

Some ctf_msg_iter instances are created not in the context of a
bt_self_message_iterator (e.g. when we create a src.ctf.fs component
and we need to build an index).  For those cases, we pass NULL.

Change-Id: I0890dd2504097cf038fd40ec6a1ce1dc099008b2
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2323
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/common/msg-iter/msg-iter.h
src/plugins/ctf/fs-src/data-stream-file.c
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/lttng-live/data-stream.c
src/plugins/ctf/lttng-live/data-stream.h
src/plugins/ctf/lttng-live/lttng-live.c
src/plugins/ctf/lttng-live/lttng-live.h
src/plugins/ctf/lttng-live/viewer-connection.c
This page took 0.026376 seconds and 4 git commands to generate.