diff mbox series

[v2,3/7] kernel-shark: Clear before loading new session

Message ID 20210517142140.286153-4-y.karadz@gmail.com (mailing list archive)
State Accepted
Commit 0929c4b624f83a3f663cf31b09769ddfce0bc91a
Headers show
Series Final fixes before KS 2.0 | expand

Commit Message

Yordan Karadzhov May 17, 2021, 2:21 p.m. UTC
Make sure that all already loaded Data streams are properly closed,
before loading a new configuration from session description file.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/KsSession.cpp | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/KsSession.cpp b/src/KsSession.cpp
index 1e19a5f..b9edb3a 100644
--- a/src/KsSession.cpp
+++ b/src/KsSession.cpp
@@ -128,6 +128,7 @@  void KsSession::loadDataStreams(kshark_context *kshark_ctx,
 
 	data->unregisterCPUCollections();
 
+	kshark_close_all(kshark_ctx);
 	dataSize = kshark_import_all_dstreams(kshark_ctx,
 					      _config,
 					      data->rows_r());