Re: [PATCH 2/3] kernel-shark: Change the mechanism of the multi-threaded search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Apr 2020 15:18:02 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > I would say we can apply both. What do you think?  
> 
> I'll try it out and let you know.

Want to resend this patch with this change?

-- Steve

diff --git a/kernel-shark/src/KsModels.cpp b/kernel-shark/src/KsModels.cpp
index ac58ca0a..51a7b79f 100644
--- a/kernel-shark/src/KsModels.cpp
+++ b/kernel-shark/src/KsModels.cpp
@@ -91,7 +91,7 @@ size_t KsFilterProxyModel::_search(int column,
 		}
 
 		/* Deal with the Progress bar of the seatch. */
-		if ((index - first) > milestone) {
+		if ((index - first) >= milestone) {
 			milestone += pbCount;
 			if (notify) {
 				/*
diff --git a/kernel-shark/src/KsTraceViewer.cpp b/kernel-shark/src/KsTraceViewer.cpp
index 12371ad7..0e0e3d4e 100644
--- a/kernel-shark/src/KsTraceViewer.cpp
+++ b/kernel-shark/src/KsTraceViewer.cpp
@@ -788,7 +788,7 @@ void KsTraceViewer::_searchItemsMT()
 					  false)); // notify = false
 
 	while (_searchFSM.getState() == search_state_t::InProgress_s &&
-	       _proxyModel.searchProgress() < KS_PROGRESS_BAR_MAX - nThreads) {
+	       _proxyModel.searchProgress() < KS_PROGRESS_BAR_MAX - nThreads - 1) {
 		std::unique_lock<std::mutex> lk(_proxyModel._mutex);
 		_proxyModel._pbCond.wait(lk);
 		_searchFSM.setProgress(_proxyModel.searchProgress());



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux