linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
	"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH] kernel-shark: Always show the true PID of the entry in the Context menu
Date: Thu, 19 Sep 2019 10:22:30 +0300	[thread overview]
Message-ID: <20190919072230.24945-1-y.karadz@gmail.com> (raw)

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


                 reply	other threads:[~2019-09-19  7:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190919072230.24945-1-y.karadz@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).