aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov (VMware) <y.karadz@gmail.com>2021-05-17 17:21:37 +0300
committerYordan Karadzhov (VMware) <y.karadz@gmail.com>2021-05-18 10:52:15 +0300
commitd0c2193ef1d6d7cfe613b3c54ac732ebe76d60e8 (patch)
tree0f4504a8da6161cd42eeee0cf7009976c4230b22
parent0929c4b624f83a3f663cf31b09769ddfce0bc91a (diff)
downloadkernel-shark-d0c2193ef1d6d7cfe613b3c54ac732ebe76d60e8.tar.gz
kernel-shark: Better handling of plugins when appending data file
It may sound like a good idea to reinitialize all plugins for all existing Data streams after a new stream is appended, but it isn't. Such reset will re-initialize all Data containers open by the plugins, hence it requires to do a complete reload of all previously loaded data. Currently we reset the plugins but do not reload the data, which is a bug. Because, reloading the data can be slow on large data sets, I prefer to fix the bug, by eliminating the reload of the plugins. Link: https://lore.kernel.org/linux-trace-devel/20210517142140.286153-5-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
-rw-r--r--src/KsUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp
index 757f49c3..3db89510 100644
--- a/src/KsUtils.cpp
+++ b/src/KsUtils.cpp
@@ -677,8 +677,7 @@ int KsDataStore::_openDataFile(kshark_context *kshark_ctx,
if (kshark_is_tep(kshark_ctx->stream[sd])) {
kshark_tep_init_all_buffers(kshark_ctx, sd);
- for (int i = 0; i < kshark_ctx->n_streams; ++i)
- kshark_tep_handle_plugins(kshark_ctx, i);
+ kshark_tep_handle_plugins(kshark_ctx, sd);
}
return sd;