diff options
author | Yordan Karadzhov <ykaradzhov@vmware.com> | 2019-04-19 16:50:35 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-04-19 13:29:26 -0400 |
commit | 1e28ff680509ded50616c812aefe6920b75a7202 (patch) | |
tree | 20b63dbf31ae610ca0aea5976fc844767ee94156 | |
parent | a9de6fa3e218ac1c0dd60c60e0f822cba5b5bcde (diff) | |
download | trace-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.cpp | 5 |
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 { |