linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Yordan Karadzhov <y.karadz@gmail.com>
Subject: [PATCH] kernel-shark: Show multi-line events in quick view
Date: Wed, 14 Dec 2022 15:46:43 -0500	[thread overview]
Message-ID: <20221214154643.43a4e137@gandalf.local.home> (raw)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

Some events (stack traces) have multiple lines, but the list view of each
event is just a single line. To get the content of the full event, if the
user selects the right mouse button over the event to trigger the quick
view, display the entire content of the event.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 src/KsQuickContextMenu.cpp | 9 +++++++++
 src/KsQuickContextMenu.hpp | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/KsQuickContextMenu.cpp b/src/KsQuickContextMenu.cpp
index 6fa242de348d..cc714bfb1aae 100644
--- a/src/KsQuickContextMenu.cpp
+++ b/src/KsQuickContextMenu.cpp
@@ -52,6 +52,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDualMarkerSM *dm,
   _row(row),
   _rawTime(this),
   _rawEvent(this),
+  _eventInfo(this),
   _graphSyncCBox(nullptr),
   _listSyncCBox(nullptr),
   _hideTaskAction(this),
@@ -104,6 +105,14 @@ KsQuickContextMenu::KsQuickContextMenu(KsDualMarkerSM *dm,
 		evtData += field + ":  " + val.setNum(fieldVal) + "\n\t";
 	}
 
+	QString evtInfo("\t");
+	evtInfo += kshark_get_info(entry);
+	evtInfo += "\n";
+
+	addSection("Event info");
+	_eventInfo.setDefaultWidget(new QLabel(evtInfo));
+	addAction(&_eventInfo);
+
 	addSection("Raw event");
 	time = QString("\ttime:  %1 [ns]").arg(entry->ts);
 
diff --git a/src/KsQuickContextMenu.hpp b/src/KsQuickContextMenu.hpp
index ca0b341dd363..c07c1a534d3a 100644
--- a/src/KsQuickContextMenu.hpp
+++ b/src/KsQuickContextMenu.hpp
@@ -91,7 +91,7 @@ private:
 
 	size_t		_row;
 
-	QWidgetAction	_rawTime, _rawEvent;
+	QWidgetAction	_rawTime, _rawEvent, _eventInfo;
 
 	QCheckBox	*_graphSyncCBox, *_listSyncCBox;
 
-- 
2.35.1


             reply	other threads:[~2022-12-14 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 20:46 Steven Rostedt [this message]
2022-12-20 16:51 ` [PATCH] kernel-shark: Show multi-line events in quick view Yordan Karadzhov
2022-12-21 16:35   ` Steven Rostedt
2022-12-21 19:27     ` Yordan Karadzhov

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=20221214154643.43a4e137@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /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).