linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel-shark: Show multi-line events in quick view
@ 2022-12-14 20:46 Steven Rostedt
  2022-12-20 16:51 ` Yordan Karadzhov
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2022-12-14 20:46 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: Yordan Karadzhov

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-21 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-14 20:46 [PATCH] kernel-shark: Show multi-line events in quick view Steven Rostedt
2022-12-20 16:51 ` Yordan Karadzhov
2022-12-21 16:35   ` Steven Rostedt
2022-12-21 19:27     ` Yordan Karadzhov

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).