aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov <ykaradzhov@vmware.com>2019-04-19 16:50:35 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-04-19 13:29:26 -0400
commit1e28ff680509ded50616c812aefe6920b75a7202 (patch)
tree20b63dbf31ae610ca0aea5976fc844767ee94156
parenta9de6fa3e218ac1c0dd60c60e0f822cba5b5bcde (diff)
downloadtrace-cmd-1e28ff680509ded50616c812aefe6920b75a7202.tar.gz
kernel-shark: Use proper searching condition when the dataset is small
If the data-set is small we do not want to have the overhead added by the update of the progress bar. Because of this we bypass the state switching of the FSM. However, in this case the the search condition has to be updated by hand. Link: http://lore.kernel.org/linux-trace-devel/20190419135036.19340-8-ykaradzhov@vmware.com Reported-by: Slavomir Kaslev <kaslevs@vmware.com> Fixes: 1615b02b (kernel-shark-qt: Optimize the search in a case of a small data-set) Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--kernel-shark/src/KsTraceViewer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel-shark/src/KsTraceViewer.cpp b/kernel-shark/src/KsTraceViewer.cpp
index 4e2c93e0..04a38b81 100644
--- a/kernel-shark/src/KsTraceViewer.cpp
+++ b/kernel-shark/src/KsTraceViewer.cpp
@@ -596,8 +596,11 @@ size_t KsTraceViewer::_searchItems()
if (_proxyModel.rowCount({}) < KS_SEARCH_SHOW_PROGRESS_MIN) {
/*
* This is a small data-set. Do a single-threaded search
- * without showing the progress.
+ * without showing the progress. We will bypass the state
+ * switching, hence the search condition has to be updated
+ * by hand.
*/
+ _searchFSM.updateCondition();
_proxyModel.search(column, searchText, _searchFSM.condition(), &_matchList,
nullptr, nullptr);
} else {