Skip to content

kernel-shark:add new plugin for xenomai cobalt_switch_context events

Hongzhan Chen linux-trace-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 5 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kernel-shark: Move common APIs and definitions out to avoid duplicationsrc/plugins/CMakeLists.txt src/plugins/CommonSched.hpp src/plugins/SchedEvents.cpp +4 more+192 -1321 reply
2/2kernel-shark: Add plugin for handling Xenomai cobalt_context_switchsrc/libkshark-tepdata.c src/plugins/CMakeLists.txt src/plugins/CobaltSwitchEvents.cpp +2 more+353 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2]kernel-shark:add new plugin for xenomai cobalt_switch_context events

1. To avoid code duplication, move some common APIs and definitions out to create new files and share with other plugins.
2. add new plugin for handling xenomai cobalt_switch_context events to visualize OOB state of RT tasks.

I tried to move common APIs and definitions to KsPlugins.cpp/hpp but found these definitions finally depend on KsMainWindow object used by _doubleClick of LatencyBox assigned by plugin_set_gui_ptr via KSHARK_MENU_PLUGIN_INITIALIZER.
I do not know how to remove this dependency so I create new files to avoid code duplication. Please suggest if there is better way.

Hongzhan Chen (2):
kernel-shark: Move common APIs and definitions out to avoid
duplication
kernel-shark: Add plugin for handling Xenomai cobalt_context_switch

 src/libkshark-tepdata.c                    |   1 +
 src/plugins/CMakeLists.txt                 |   6 +-
 src/plugins/CobaltSwitchEvents.cpp         | 125 +++++++++++++++
 src/plugins/CommonSched.hpp                |  99 ++++++++++++
 src/plugins/SchedEvents.cpp                |  87 +----------
 src/plugins/common_sched.c                 |  37 +++++
 src/plugins/common_sched.h                 |  50 ++++++
 src/plugins/sched_events.c                 |  37 +----
 src/plugins/sched_events.h                 |  12 +-
 src/plugins/xenomai_cobalt_switch_events.c | 169 +++++++++++++++++++++
 src/plugins/xenomai_cobalt_switch_events.h |  54 +++++++
 11 files changed, 545 insertions(+), 132 deletions(-)
 create mode 100644 src/plugins/CobaltSwitchEvents.cpp
 create mode 100644 src/plugins/CommonSched.hpp
 create mode 100644 src/plugins/common_sched.c
 create mode 100644 src/plugins/common_sched.h
 create mode 100644 src/plugins/xenomai_cobalt_switch_events.c
 create mode 100644 src/plugins/xenomai_cobalt_switch_events.h
Signature · 1 line
2.17.1