[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140122190906.GA2608@katana>
Date: Wed, 22 Jan 2014 20:09:06 +0100
From: Wolfram Sang <wsa@...-dreams.de>
To: David Howells <dhowells@...hat.com>
Cc: wolfram@...-dreams.de, khali@...ux-fr.org,
linux-i2c@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] i2c: Add message transfer tracepoints for I2C
On Thu, Jan 09, 2014 at 09:49:54PM +0000, David Howells wrote:
> Add tracepoints into the I2C message transfer function to retrieve the message
> sent or received. The following config options must be turned on to make use
> of the facility:
>
> CONFIG_FTRACE
> CONFIG_ENABLE_DEFAULT_TRACERS
>
> The I2C tracepoint can be enabled thusly:
>
> echo 1 >/sys/kernel/debug/tracing/events/i2c/i2c_transfer/enable
>
> and will dump messages that can be viewed in /sys/kernel/debug/tracing/trace
> that look like:
>
> ... i2c_write: i2c-5 #0 f=00 a=44 l=2 [0214]
> ... i2c_read: i2c-5 #1 f=01 a=44 l=4
> ... i2c_reply: i2c-5 #1 f=01 a=44 l=4 [33000000]
> ... i2c_result: i2c-5 n=2 ret=2
>
> formatted as:
>
> i2c-<adapter-nr>
> #<message-array-index>
> f=<flags>
> a=<addr>
> l=<datalen>
> n=<message-array-size>
> ret=<result>
> [<data>]
>
> The operation is done between the i2c_write/i2c_read lines and the i2c_reply
> and i2c_result lines so that if the hardware hangs, the trace buffer can be
> consulted to determine the problematic operation.
>
> The adapters to be traced can be selected by something like:
>
> echo adapter_nr==1 >/sys/kernel/debug/tracing/events/i2c/filter
>
> These changes are based on code from Steven Rostedt.
>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Reviewed-by: Steven Rostedt <rostedt@...dmis.org>
Thanks for doing this, much appreciated. One of the first things I'll
review (and play with) next. But hey, has nobody else checked this out
by now? Tested-by or acks very welcome.
Thanks,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists