Skip to contentSkip to conversation

New plugins for KS 2.0

PATCH In review Yordan Karadzhov (VMware) 2 participants 4 messages Apr 29, 2021 – May 6, 2021

lore
Share & tools
lore
#0 lore raw

cover New plugins for KS 2.0

This patch applies on top of the
"(Not so) Minor fixes toward KS 2.0" v2 patch-set.

Yordan Karadzhov (VMware) (2):
kernel-shark: Add EventFieldPlot plugin
kernel-shark: Add LatencyPlot plugin

 src/plugins/CMakeLists.txt        |  10 +
 src/plugins/EventFieldDialog.cpp  | 183 ++++++++++++++++++
 src/plugins/EventFieldDialog.hpp  |  60 ++++++
 src/plugins/EventFieldPlot.cpp    | 109 +++++++++++
 src/plugins/LatencyPlot.cpp       | 305 ++++++++++++++++++++++++++++++
 src/plugins/LatencyPlotDialog.cpp | 184 ++++++++++++++++++
 src/plugins/LatencyPlotDialog.hpp |  59 ++++++
 src/plugins/event_field_plot.c    | 125 ++++++++++++
 src/plugins/event_field_plot.h    |  64 +++++++
 src/plugins/latency_plot.c        | 168 ++++++++++++++++
 src/plugins/latency_plot.h        |  62 ++++++
 tests/libkshark-gui-tests.cpp     |   2 +
 12 files changed, 1331 insertions(+)
 create mode 100644 src/plugins/EventFieldDialog.cpp
 create mode 100644 src/plugins/EventFieldDialog.hpp
 create mode 100644 src/plugins/EventFieldPlot.cpp
 create mode 100644 src/plugins/LatencyPlot.cpp
 create mode 100644 src/plugins/LatencyPlotDialog.cpp
 create mode 100644 src/plugins/LatencyPlotDialog.hpp
 create mode 100644 src/plugins/event_field_plot.c
 create mode 100644 src/plugins/event_field_plot.h
 create mode 100644 src/plugins/latency_plot.c
 create mode 100644 src/plugins/latency_plot.h
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/2 kernel-shark: Add EventFieldPlot plugin

The plugin allows the user to visualize the recorded value of a given data field from a given trace event. The core logic that implements the processing of the data and the visualization itself is rather simple. It is implemented in:
event_field_plot.h,
event_field_plot.c and
EventFieldPlot.cpp

The plugin also registers its own dialog, that allows the user to select the event and field to be visualized. The widget of the dialog gets implemented in:
EventFieldDialog.hpp and
EventFieldDialog.cpp

---
 src/plugins/CMakeLists.txt       |   5 +
 src/plugins/EventFieldDialog.cpp | 183 +++++++++++++++++++++++++++++++
 src/plugins/EventFieldDialog.hpp |  60 ++++++++++
 src/plugins/EventFieldPlot.cpp   | 109 ++++++++++++++++++
 src/plugins/event_field_plot.c   | 125 +++++++++++++++++++++
 src/plugins/event_field_plot.h   |  64 +++++++++++
 tests/libkshark-gui-tests.cpp    |   1 +
 7 files changed, 547 insertions(+)
 create mode 100644 src/plugins/EventFieldDialog.cpp
 create mode 100644 src/plugins/EventFieldDialog.hpp
 create mode 100644 src/plugins/EventFieldPlot.cpp
 create mode 100644 src/plugins/event_field_plot.c
 create mode 100644 src/plugins/event_field_plot.h
src/plugins/CMakeLists.txt +5 -0
index 5e28368..333f0da 100644
@@ -44,6 +44,11 @@ if (Qt5Widgets_FOUND AND TT_FONT_FILE)
                      SOURCE sched_events.c SchedEvents.cpp)
     list(APPEND PLUGIN_LIST "sched_events")
 
+    BUILD_GUI_PLUGIN(NAME event_field_plot
+                     MOC EventFieldDialog.hpp
+                     SOURCE event_field_plot.c EventFieldDialog.cpp EventFieldPlot.cpp)
+    list(APPEND PLUGIN_LIST "event_field_plot")
+
 endif (Qt5Widgets_FOUND AND TT_FONT_FILE)
 
 BUILD_PLUGIN(NAME missed_events
src/plugins/EventFieldDialog.cpp new file +183 -0

183 lines not on this page · raw message

src/plugins/EventFieldDialog.hpp new file +60 -0

60 lines not on this page · raw message

src/plugins/EventFieldPlot.cpp new file +109 -0

109 lines not on this page · raw message

src/plugins/event_field_plot.c new file +125 -0

125 lines not on this page · raw message

src/plugins/event_field_plot.h new file +64 -0

64 lines not on this page · raw message

tests/libkshark-gui-tests.cpp +1 -0
index bc49194..a023c39 100644
@@ -147,6 +147,7 @@ BOOST_AUTO_TEST_CASE(KsUtils_KsDataStore)
 BOOST_AUTO_TEST_CASE(KsUtils_getPluginList)
 {
 	QStringList plugins{"sched_events",
+			    "event_field_plot",
 			    "missed_events"
 	};
 
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/2 kernel-shark: Add LatencyPlot plugin

In reply to Yordan Karadzhov (VMware)

The plugin allows the user to visualize the latency between two events under the condition that the values of given data fields in the two events are identical (for example having the same PID). The core logic that implements the processing of the data and the visualization itself is implemented in:

src/plugins/latency_plot.h,
src/plugins/latency_plot.c and
src/plugins/LatencyPlot.cpp

The plugin also registers its own dialog, that allows the user to select the events (and the matching field) to be visualized. The widget of the dialog gets implemented in:

src/plugins/LatencyPlotDialog.hpp
src/plugins/LatencyPlotDialog.cpp

---
 src/plugins/CMakeLists.txt        |   5 +
 src/plugins/LatencyPlot.cpp       | 305 ++++++++++++++++++++++++++++++
 src/plugins/LatencyPlotDialog.cpp | 184 ++++++++++++++++++
 src/plugins/LatencyPlotDialog.hpp |  59 ++++++
 src/plugins/latency_plot.c        | 168 ++++++++++++++++
 src/plugins/latency_plot.h        |  62 ++++++
 tests/libkshark-gui-tests.cpp     |   1 +
 7 files changed, 784 insertions(+)
 create mode 100644 src/plugins/LatencyPlot.cpp
 create mode 100644 src/plugins/LatencyPlotDialog.cpp
 create mode 100644 src/plugins/LatencyPlotDialog.hpp
 create mode 100644 src/plugins/latency_plot.c
 create mode 100644 src/plugins/latency_plot.h
src/plugins/CMakeLists.txt +5 -0
index 333f0da..2906dd4 100644
@@ -49,6 +49,11 @@ if (Qt5Widgets_FOUND AND TT_FONT_FILE)
                      SOURCE event_field_plot.c EventFieldDialog.cpp EventFieldPlot.cpp)
     list(APPEND PLUGIN_LIST "event_field_plot")
 
+    BUILD_GUI_PLUGIN(NAME latency_plot
+                     MOC LatencyPlotDialog.hpp
+                     SOURCE latency_plot.c LatencyPlot.cpp LatencyPlotDialog.cpp)
+    list(APPEND PLUGIN_LIST "latency_plot")
+
 endif (Qt5Widgets_FOUND AND TT_FONT_FILE)
 
 BUILD_PLUGIN(NAME missed_events
src/plugins/LatencyPlot.cpp new file +305 -0

305 lines not on this page · raw message

src/plugins/LatencyPlotDialog.cpp new file +184 -0

184 lines not on this page · raw message

src/plugins/LatencyPlotDialog.hpp new file +59 -0

59 lines not on this page · raw message

src/plugins/latency_plot.c new file +168 -0

168 lines not on this page · raw message

src/plugins/latency_plot.h new file +62 -0

62 lines not on this page · raw message

tests/libkshark-gui-tests.cpp +1 -0
index a023c39..f96b3dd 100644
@@ -148,6 +148,7 @@ BOOST_AUTO_TEST_CASE(KsUtils_getPluginList)
 {
 	QStringList plugins{"sched_events",
 			    "event_field_plot",
+			    "latency_plot",
 			    "missed_events"
 	};
 
Signature · 1 line
2.27.0
#3 lore raw

Re: [PATCH 2/2] kernel-shark: Add LatencyPlot plugin

Quoted 5 lines · On Thu, 29 Apr 2021 18:44:21 +0300 "Yordan Karadzhov (VMware)"…

The plugin allows the user to visualize the latency between two events under the condition that the values of given data fields in the two events are identical (for example having the same PID). The core logic that implements the processing of the data and the visualization itself is implemented in:

THIS FEATURE IS FREAKING HOT!!!!

OMG! Seriously Yordan, this is awesome. I could have soooo used this in the past. I LOVE the way the markers automatically select both the start and end of the latency. This is a feature that will get a LOT of attention!

WAY TO GO, Yordan!

-- Steve

Quoted 13 lines

src/plugins/latency_plot.h,
src/plugins/latency_plot.c and
src/plugins/LatencyPlot.cpp

The plugin also registers its own dialog, that allows the user to select the events (and the matching field) to be visualized. The widget of the dialog gets implemented in:

src/plugins/LatencyPlotDialog.hpp
src/plugins/LatencyPlotDialog.cpp