All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org,
	khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] i2c: Add message transfer tracepoints for I2C [ver #2]
Date: Thu, 13 Mar 2014 22:15:32 +0100	[thread overview]
Message-ID: <20140313211532.GA2696@katana> (raw)
In-Reply-To: <20140306133559.29345.61422.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

On Thu, Mar 06, 2014 at 01:35:59PM +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 a=044 f=0000 l=2 [02-14]
> 	... i2c_read: i2c-5 #1 a=044 f=0001 l=4
> 	... i2c_reply: i2c-5 #1 a=044 f=0001 l=4 [33-00-00-00]
> 	... i2c_result: i2c-5 n=2 ret=2
> 
> formatted as:
> 
> 	i2c-<adapter-nr>
> 	#<message-array-index>
> 	a=<addr>
> 	f=<flags>
> 	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-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
> Signed-off-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: David Howells <dhowells@redhat.com>
Cc: wolfram@the-dreams.de, khali@linux-fr.org,
	linux-i2c@vger.kernel.org, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: Add message transfer tracepoints for I2C [ver #2]
Date: Thu, 13 Mar 2014 22:15:32 +0100	[thread overview]
Message-ID: <20140313211532.GA2696@katana> (raw)
In-Reply-To: <20140306133559.29345.61422.stgit@warthog.procyon.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

On Thu, Mar 06, 2014 at 01:35:59PM +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 a=044 f=0000 l=2 [02-14]
> 	... i2c_read: i2c-5 #1 a=044 f=0001 l=4
> 	... i2c_reply: i2c-5 #1 a=044 f=0001 l=4 [33-00-00-00]
> 	... i2c_result: i2c-5 n=2 ret=2
> 
> formatted as:
> 
> 	i2c-<adapter-nr>
> 	#<message-array-index>
> 	a=<addr>
> 	f=<flags>
> 	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@goodmis.org>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-03-13 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 13:35 [PATCH 1/2] i2c: Add message transfer tracepoints for I2C [ver #2] David Howells
2014-03-06 13:36 ` [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS " David Howells
     [not found]   ` <20140306133606.29345.97103.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2014-03-13 21:15     ` Wolfram Sang
2014-03-13 21:15       ` Wolfram Sang
     [not found] ` <20140306133559.29345.61422.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2014-03-13 21:15   ` Wolfram Sang [this message]
2014-03-13 21:15     ` [PATCH 1/2] i2c: Add message transfer tracepoints for I2C " Wolfram Sang

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=20140313211532.GA2696@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
    --cc=wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.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.