linux/include/trace
David Howells 8a325997d9 i2c: Add message transfer tracepoints for SMBUS [ver #2]
The SMBUS tracepoints can be enabled thusly:

	echo 1 >/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-<adapter-nr>
	a=<addr>
	f=<flags>
	c=<command>
	<protocol-name>
	<rd|wr>
	res=<result>
	l=<data-len>
	[<data-block>]

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

	echo adapter_nr==1 >/sys/kernel/debug/tracing/events/i2c/filter

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

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-03-13 22:15:07 +01:00
..
events i2c: Add message transfer tracepoints for SMBUS [ver #2] 2014-03-13 22:15:07 +01:00
define_trace.h tracing: Add DEFINE_EVENT_FN() macro 2013-06-20 22:24:32 -07:00
ftrace.h tracing: Consolidate event trigger code 2014-01-09 21:20:07 -05:00
syscall.h tracing: Add missing syscall_metadata comment 2013-07-01 20:34:25 -04:00