From: Adam Goldman <adamg@pobox.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firewire: core: option to log bus reset initiation
Date: Tue, 26 Mar 2024 05:18:32 -0700 [thread overview]
Message-ID: <ZgK9GNLURNg63zRU@iguana.24-8.net> (raw)
In-Reply-To: <20240325004134.GA21329@workstation.local>
Hi Takashi,
On Mon, Mar 25, 2024 at 09:41:34AM +0900, Takashi Sakamoto wrote:
> Now we have two debug parameters per module for the slightly-similar
> purpose. In my opinion, it is a pretty cumbersome to enable them when
> checking bus-reset behaviour. I think it is time to investigate the other
> way.
>
> Linux Kernel Tracepoints[2] is one of options. Roughly describing, the
> tracepoints mechanism allows users to deliver structured data from kernel
> space to user space via ring-buffer when enabling it by either sysfs or
> kernel command-line parameters. Linux kernel also has a command-line
> parameter to redirect the human-readable formatted data to kernel log[3].
> I think it is suitable in the case.
>
> It requires many work to replace the existent debug parameter of
> firewire-ohci, while it is a good start to work just for bus-reset debug.
> The data structure layout should be pre-defined in each subsystem, thus we
> need to decide it. In my opinion, it would be like:
>
> ```
> struct bus_reset_event {
> enum reason {
> Initiate,
> Schedule,
> Postpone,
> Detect,
> },
> // We can put any other data if prefering.
> }
> ```
Maybe these should be four separate trace events?
> Would I ask your opinion about my idea?
It seems that tracepoints are the modern way to make debugging logs, so
if we want to modernize the FireWire driver, we should replace the
existent logging with tracepoints.
-- Adam
next prev parent reply other threads:[~2024-03-26 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Zfqo43xhFluOgO01@iguana.24-8.net>
2024-03-25 0:41 ` Takashi Sakamoto
2024-03-26 12:18 ` Adam Goldman [this message]
2024-03-26 12:38 ` Takashi Sakamoto
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=ZgK9GNLURNg63zRU@iguana.24-8.net \
--to=adamg@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=o-takashi@sakamocchi.jp \
/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
all inboxes | Powered by JetHome®