Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS [ver #2]

2014-03-13 Thread Wolfram Sang
On Thu, Mar 06, 2014 at 01:36:06PM +, David Howells wrote: > 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: > > ...

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS [ver #2]

2014-03-13 Thread Wolfram Sang
On Thu, Mar 06, 2014 at 01:36:06PM +, David Howells wrote: 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:

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread David Howells
Wolfram Sang wrote: > Yes, that's good, too! I've posted my current patches. I've put address before flags and increased the address field to 3 hex chars and the flags to four. I've made it interpolate dashes to indicate the byte divisions in the data dump. I'll follow up with a separate

[PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS [ver #2]

2014-03-06 Thread David Howells
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= c=fa BYTE_DATA ... smbus_reply: i2c-0 a=051

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread Wolfram Sang
On Thu, Mar 06, 2014 at 01:13:55PM +, David Howells wrote: > David Howells wrote: > > > > Can we have something like this for 'flags'? > > > > There's a __print_flags() which should work. One thing I'm concerned about > > there is how do we handle more flags being added - does that count

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread David Howells
David Howells wrote: > > Can we have something like this for 'flags'? > > There's a __print_flags() which should work. One thing I'm concerned about > there is how do we handle more flags being added - does that count as an ABI > break if the printed format changes? > > SMBus flags are

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread David Howells
David Howells dhowe...@redhat.com wrote: Can we have something like this for 'flags'? There's a __print_flags() which should work. One thing I'm concerned about there is how do we handle more flags being added - does that count as an ABI break if the printed format changes? SMBus flags

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread Wolfram Sang
On Thu, Mar 06, 2014 at 01:13:55PM +, David Howells wrote: David Howells dhowe...@redhat.com wrote: Can we have something like this for 'flags'? There's a __print_flags() which should work. One thing I'm concerned about there is how do we handle more flags being added - does that

[PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS [ver #2]

2014-03-06 Thread David Howells
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= c=fa BYTE_DATA ... smbus_reply: i2c-0 a=051

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-03-06 Thread David Howells
Wolfram Sang w...@the-dreams.de wrote: Yes, that's good, too! I've posted my current patches. I've put address before flags and increased the address field to 3 hex chars and the flags to four. I've made it interpolate dashes to indicate the byte divisions in the data dump. I'll follow up

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-28 Thread David Howells
Wolfram Sang wrote: > > > Can we have something like this for 'flags'? > > > > There's a __print_flags() which should work. One thing I'm concerned about > > there is how do we handle more flags being added - does that count as an ABI > > break if the printed format changes? > > Not sure, I

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-28 Thread Wolfram Sang
> > Also, the I2C tracing has first 'f' then 'a', that should be consistent, > > too. > > Flags first or address first? Do you have a preference (for both)? I'd say address first, yet no strong preference. > > Can we have something like this for 'flags'? > > There's a __print_flags() which

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-28 Thread Wolfram Sang
Also, the I2C tracing has first 'f' then 'a', that should be consistent, too. Flags first or address first? Do you have a preference (for both)? I'd say address first, yet no strong preference. Can we have something like this for 'flags'? There's a __print_flags() which should

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-28 Thread David Howells
Wolfram Sang w...@the-dreams.de wrote: Can we have something like this for 'flags'? There's a __print_flags() which should work. One thing I'm concerned about there is how do we handle more flags being added - does that count as an ABI break if the printed format changes? Not

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-27 Thread David Howells
Wolfram Sang wrote: > Although SMBus has no 10-bit addresses, we probably should also use %03x > there for consistency reasons? Done. > Also, the I2C tracing has first 'f' then 'a', that should be consistent, > too. Flags first or address first? Do you have a preference (for both)? >

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-27 Thread David Howells
Wolfram Sang w...@the-dreams.de wrote: Although SMBus has no 10-bit addresses, we probably should also use %03x there for consistency reasons? Done. Also, the I2C tracing has first 'f' then 'a', that should be consistent, too. Flags first or address first? Do you have a preference (for

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-18 Thread Wolfram Sang
> + TP_printk("i2c-%d a=%02x f=%02x c=%x %s l=%u [%*phN]", Although SMBus has no 10-bit addresses, we probably should also use %03x there for consistency reasons? Also, the I2C tracing has first 'f' then 'a', that should be consistent, too. 'flags' should be %04x again and I'd prefer %*ph

Re: [PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-02-18 Thread Wolfram Sang
+ TP_printk(i2c-%d a=%02x f=%02x c=%x %s l=%u [%*phN], Although SMBus has no 10-bit addresses, we probably should also use %03x there for consistency reasons? Also, the I2C tracing has first 'f' then 'a', that should be consistent, too. 'flags' should be %04x again and I'd prefer %*ph (or

[PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-01-09 Thread David Howells
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=51 f=00 c=fa BYTE_DATA ... smbus_reply: i2c-0 a=51 f=00

[PATCH 2/2] i2c: Add message transfer tracepoints for SMBUS

2014-01-09 Thread David Howells
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=51 f=00 c=fa BYTE_DATA ... smbus_reply: i2c-0 a=51 f=00