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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 14 Nov 2019 22:49:12 +0000 (17:49 -0500)
commit2428e031943674437237ff59ad4c5f13ea73f081
tree9f6214b5e6c6f6db15b16beb7b28fa4ad09ed72b
parent5d452e1fef736bf4e80bc48d9d60c08c949ced36
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.025639 seconds and 4 git commands to generate.