Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] kernel-shark: Always show the true PID of the entry in the Context menu
@ 2019-09-19  7:22 Yordan Karadzhov (VMware)
  0 siblings, 0 replies; only message in thread
From: Yordan Karadzhov (VMware) @ 2019-09-19  7:22 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov (VMware)

All data fields of the kshark_entry object can be modified by plugins
(including the  Process Id). This is usually done in order to modify
the way some events are visualized. However, the Context menu should
always show the true (unmodified) value of the PID.

Reported-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Fixing: 4828dc763 (kernel-shark-qt: Add centralized context menu for View and Graph widgets)
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/KsQuickContextMenu.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel-shark/src/KsQuickContextMenu.cpp b/kernel-shark/src/KsQuickContextMenu.cpp
index 728ecbd..a84444e 100644
--- a/kernel-shark/src/KsQuickContextMenu.cpp
+++ b/kernel-shark/src/KsQuickContextMenu.cpp
@@ -142,7 +142,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 			descr = "Remove [";
 			descr += taskName;
 			descr += "-";
-			descr += QString("%1").arg(_data->rows()[_row]->pid);
+			descr += QString("%1").arg(pid);
 			descr += "] plot";
 			lamAddAction(&_removeTaskPlotAction,
 				     &KsQuickContextMenu::_removeTaskPlot);
@@ -150,7 +150,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 			descr = "Add [";
 			descr += taskName;
 			descr += "-";
-			descr += QString("%1").arg(_data->rows()[_row]->pid);
+			descr += QString("%1").arg(pid);
 			descr += "] plot";
 			lamAddAction(&_addTaskPlotAction,
 				     &KsQuickContextMenu::_addTaskPlot);
-- 
2.20.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19  7:22 [PATCH] kernel-shark: Always show the true PID of the entry in the Context menu Yordan Karadzhov (VMware)

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox