All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yordan Karadzhov <y.karadz@gmail.com>
To: Hongzhan Chen <hongzhan.chen@intel.com>,
	linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2 0/2]kernel-shark:add new plugin for xenomai cobalt_switch_context events
Date: Wed, 5 Jan 2022 13:32:08 +0200	[thread overview]
Message-ID: <9587a26b-e9fb-a9b4-c94d-29354abc3b84@gmail.com> (raw)
In-Reply-To: <20211222064014.4471-1-hongzhan.chen@intel.com>



On 22.12.21 г. 8:40 ч., Hongzhan Chen wrote:
> 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.

Hi Hongzhan,

Indeed, this turns to be a bit trickier than I expected, but it is possible.
I will comment in the patch.

thanks,
Yordan

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

  parent reply	other threads:[~2022-01-05 11:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  6:40 [PATCH v2 0/2]kernel-shark:add new plugin for xenomai cobalt_switch_context events Hongzhan Chen
2021-12-22  6:40 ` [PATCH v2 1/2] kernel-shark: Move common APIs and definitions out to avoid duplication Hongzhan Chen
2022-01-05 11:34   ` Yordan Karadzhov
2021-12-22  6:40 ` [PATCH v2 2/2] kernel-shark: Add plugin for handling Xenomai cobalt_context_switch Hongzhan Chen
2022-01-05 11:32 ` Yordan Karadzhov [this message]
2022-01-06 17:18 ` [PATCH v2 0/2]kernel-shark:add new plugin for xenomai cobalt_switch_context events Steven Rostedt
2022-01-06 17:32   ` Yordan Karadzhov
2022-01-06 18:32     ` Steven Rostedt

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=9587a26b-e9fb-a9b4-c94d-29354abc3b84@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=hongzhan.chen@intel.com \
    --cc=linux-trace-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.