From 76edbcf1a675fe2d7d058c1b3ae1bd6fbe073e1c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 9 May 2022 21:56:33 -0400 Subject: [PATCH] src.ctf.fs: remove unused ctf_fs_ds_file::self_msg_iter field Remove the unused field, and then the unused ctf_fs_ds_file_create parameter. Change-Id: I275622d454bbcb71a2035bf73d2490a8dd94c5f3 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8009 Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/plugins/ctf/fs-src/data-stream-file.cpp | 11 ++++------- src/plugins/ctf/fs-src/data-stream-file.hpp | 9 ++------- src/plugins/ctf/fs-src/fs.cpp | 4 ++-- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/plugins/ctf/fs-src/data-stream-file.cpp b/src/plugins/ctf/fs-src/data-stream-file.cpp index f545cefc..9a49fd99 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.cpp +++ b/src/plugins/ctf/fs-src/data-stream-file.cpp @@ -334,8 +334,8 @@ ctf_fs_ds_group_medops_set_file(struct ctf_fs_ds_group_medops_data *data, /* Create the new file. */ data->file = - ctf_fs_ds_file_create(data->ds_file_group->ctf_fs_trace, self_msg_iter, - data->ds_file_group->stream, index_entry->path, log_level); + ctf_fs_ds_file_create(data->ds_file_group->ctf_fs_trace, data->ds_file_group->stream, + index_entry->path, log_level); if (!data->file) { BT_MSG_ITER_LOGE_APPEND_CAUSE(self_msg_iter, "failed to create ctf_fs_ds_file."); status = CTF_MSG_ITER_MEDIUM_STATUS_ERROR; @@ -850,10 +850,8 @@ error: } BT_HIDDEN -struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, - bt_self_message_iterator *self_msg_iter, - bt_stream *stream, const char *path, - bt_logging_level log_level) +struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, bt_stream *stream, + const char *path, bt_logging_level log_level) { int ret; const size_t offset_align = bt_mmap_get_offset_align_size(log_level); @@ -865,7 +863,6 @@ struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, ds_file->log_level = log_level; ds_file->self_comp = ctf_fs_trace->self_comp; - ds_file->self_msg_iter = self_msg_iter; ds_file->file = ctf_fs_file_create(log_level, ds_file->self_comp); if (!ds_file->file) { goto error; diff --git a/src/plugins/ctf/fs-src/data-stream-file.hpp b/src/plugins/ctf/fs-src/data-stream-file.hpp index 7ed41c2a..5723d760 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.hpp +++ b/src/plugins/ctf/fs-src/data-stream-file.hpp @@ -41,9 +41,6 @@ struct ctf_fs_ds_file /* Weak */ bt_self_component *self_comp; - /* Weak */ - bt_self_message_iterator *self_msg_iter; - /* Weak */ struct ctf_fs_metadata *metadata; @@ -75,10 +72,8 @@ struct ctf_fs_ds_file }; BT_HIDDEN -struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, - bt_self_message_iterator *self_msg_iter, - bt_stream *stream, const char *path, - bt_logging_level log_level); +struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, bt_stream *stream, + const char *path, bt_logging_level log_level); BT_HIDDEN void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream); diff --git a/src/plugins/ctf/fs-src/fs.cpp b/src/plugins/ctf/fs-src/fs.cpp index 5cdabcad..d26bbdfb 100644 --- a/src/plugins/ctf/fs-src/fs.cpp +++ b/src/plugins/ctf/fs-src/fs.cpp @@ -703,7 +703,7 @@ static int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace, const * Create a temporary ds_file to read some properties about the data * stream file. */ - ds_file = ctf_fs_ds_file_create(ctf_fs_trace, NULL, NULL, path, log_level); + ds_file = ctf_fs_ds_file_create(ctf_fs_trace, NULL, path, log_level); if (!ds_file) { goto error; } @@ -1379,7 +1379,7 @@ static int decode_clock_snapshot_after_event(struct ctf_fs_trace *ctf_fs_trace, BT_ASSERT(index_entry); BT_ASSERT(index_entry->path); - ds_file = ctf_fs_ds_file_create(ctf_fs_trace, NULL, NULL, index_entry->path, log_level); + ds_file = ctf_fs_ds_file_create(ctf_fs_trace, NULL, index_entry->path, log_level); if (!ds_file) { BT_COMP_LOGE_APPEND_CAUSE(self_comp, "Failed to create a ctf_fs_ds_file"); ret = -1; -- 2.34.1