diff mbox series

[4/8] kernel-shark: Don't use Data collection when checking if the bin is empty

Message ID 20190213161216.14438-5-ykaradzhov@vmware.com (mailing list archive)
State Accepted
Headers show
Series Various modifications toward KS 1.0 | expand

Commit Message

Yordan Karadzhov Feb. 13, 2019, 4:12 p.m. UTC
When plotting a task graph and no data from the Task is found in the bin,
we check the CPU, previously used by the task, searching for data from
another task running on the same CPU. However this search will always
fail if we use the Data collection of the plotted task.

Fixes: ba206aaa45 ("kernel-shark-qt: Add C++ API for drawing of Graphs")
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark/src/KsPlotTools.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/KsPlotTools.cpp b/kernel-shark/src/KsPlotTools.cpp
index f97c6e4..d07f414 100644
--- a/kernel-shark/src/KsPlotTools.cpp
+++ b/kernel-shark/src/KsPlotTools.cpp
@@ -929,13 +929,15 @@  void Graph::fillTaskGraph(int pid)
 		} else {
 			/*
 			 * No data from the Task in this bin. Check the CPU,
-			 * previously used by the task.
+			 * previously used by the task. We are looking for
+			 * data from another task running on the same CPU,
+			 * hence we cannot use the collection of this task.
 			 */
 			int cpuPid = ksmodel_get_pid_back(_histoPtr,
 							  bin,
 							  lastCpu,
 							  false,
-							  _collectionPtr,
+							  nullptr, // No collection
 							  nullptr);
 
 			if (cpuPid != KS_EMPTY_BIN) {