From: Wolfram Sang <wsa@kernel.org>
To: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Jamie Iles <quic_jiles@quicinc.com>,
Graeme Gregory <quic_ggregory@quicinc.com>,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2] i2c: add tracepoints for I2C slave events
Date: Fri, 18 Mar 2022 11:53:48 +0100 [thread overview]
Message-ID: <YjRkvPc9uahbozbQ@shikoro> (raw)
In-Reply-To: <20220308163333.3985974-1-quic_jaehyoo@quicinc.com>
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
Hi,
On Tue, Mar 08, 2022 at 08:33:33AM -0800, Jae Hyun Yoo wrote:
> I2C slave events tracepoints can be enabled by:
>
> echo 1 > /sys/kernel/tracing/events/i2c_slave/enable
>
> and logs in /sys/kernel/tracing/trace will look like:
>
> ... i2c_slave: i2c-0 a=010 WR_REQ []
> ... i2c_slave: i2c-0 a=010 WR_RCV [02]
> ... i2c_slave: i2c-0 a=010 WR_RCV [0c]
> ... i2c_slave: i2c-0 a=010 STOP []
> ... i2c_slave: i2c-0 a=010 RD_REQ [04]
> ... i2c_slave: i2c-0 a=010 RD_PRO [b4]
> ... i2c_slave: i2c-0 a=010 STOP []
>
> formatted as:
>
> i2c-<adapter-nr>
> a=<addr>
> <event>
> [<data>]
>
> trace printings can be selected by adding a filter like:
>
> echo adapter_nr==1 >/sys/kernel/tracing/events/i2c_slave/filter
>
> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Steven, are you happy with the tracepoint parts of this patch?
> + if (trace_i2c_slave_enabled() && !ret)
> + trace_i2c_slave(client, event, val);
Why '!ret'? I think we should always print 'ret' in the trace as well.
Backends are allowed to send errnos on WRITE_RECEIVED to NACK the
reception of a byte. This is useful information, too, or?
Rest looks good to me.
Thanks,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-03-18 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 16:33 [PATCH v2] i2c: add tracepoints for I2C slave events Jae Hyun Yoo
2022-03-18 10:53 ` Wolfram Sang [this message]
2022-03-18 13:58 ` Steven Rostedt
2022-03-18 14:09 ` Jae Hyun Yoo
2022-03-18 14:02 ` Steven Rostedt
2022-03-18 14:14 ` Jae Hyun Yoo
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=YjRkvPc9uahbozbQ@shikoro \
--to=wsa@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=quic_ggregory@quicinc.com \
--cc=quic_jaehyoo@quicinc.com \
--cc=quic_jiles@quicinc.com \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox