<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/trace/events/i2c.h, branch v4.7.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.7.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.7.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2014-03-13T21:15:07+00:00</updated>
<entry>
<title>i2c: Add message transfer tracepoints for SMBUS [ver #2]</title>
<updated>2014-03-13T21:15:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-03-06T13:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a325997d95d446206b204b7859e055a0315e4fa'/>
<id>urn:sha1:8a325997d95d446206b204b7859e055a0315e4fa</id>
<content type='text'>
The SMBUS tracepoints can be enabled thusly:

	echo 1 &gt;/sys/kernel/debug/tracing/events/i2c/enable

and will dump messages that can be viewed in /sys/kernel/debug/tracing/trace
that look like:

         ... smbus_read: i2c-0 a=051 f=0000 c=fa BYTE_DATA
         ... smbus_reply: i2c-0 a=051 f=0000 c=fa BYTE_DATA l=1 [39]
         ... smbus_result: i2c-0 a=051 f=0000 c=fa BYTE_DATA rd res=0

formatted as:

	i2c-&lt;adapter-nr&gt;
	a=&lt;addr&gt;
	f=&lt;flags&gt;
	c=&lt;command&gt;
	&lt;protocol-name&gt;
	&lt;rd|wr&gt;
	res=&lt;result&gt;
	l=&lt;data-len&gt;
	[&lt;data-block&gt;]

The adapters to be traced can be selected by something like:

	echo adapter_nr==1 &gt;/sys/kernel/debug/tracing/events/i2c/filter

Note that this shares the same filter and enablement as i2c.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: Add message transfer tracepoints for I2C</title>
<updated>2014-03-13T21:12:53+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-03-06T13:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9a83d62b326574fb4831b64317a82a42642a9a2'/>
<id>urn:sha1:d9a83d62b326574fb4831b64317a82a42642a9a2</id>
<content type='text'>
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 &gt;/sys/kernel/debug/tracing/events/i2c/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-&lt;adapter-nr&gt;
	#&lt;message-array-index&gt;
	a=&lt;addr&gt;
	f=&lt;flags&gt;
	l=&lt;datalen&gt;
	n=&lt;message-array-size&gt;
	ret=&lt;result&gt;
	[&lt;data&gt;]

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 &gt;/sys/kernel/debug/tracing/events/i2c/filter

These changes are based on code from Steven Rostedt.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
[wsa: adapted path for 'enable' in the commit msg]
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
