Hi Steven,
On 3/18/2022 7:02 AM, Steven Rostedt wrote:
[...]
+ TP_printk("i2c-%d a=%03x %s [%*phD]",
+ __entry->adapter_nr, __entry->addr,
+ __print_symbolic(__entry->event,
+ { I2C_SLAVE_READ_REQUESTED, "RD_REQ" },
+ { I2C_SLAVE_WRITE_REQUESTED, "WR_REQ" },
+ { I2C_SLAVE_READ_PROCESSED, "RD_PRO" },
+ { I2C_SLAVE_WRITE_RECEIVED, "WR_RCV" },
+ { I2C_SLAVE_STOP, " STOP" }),
For the above to be useful for perf and trace-cmd (user space tools) you
will need to export them with:
TRACE_DEFINE_ENUM(I2C_SLAVE_READ_REQUESTED);
TRACE_DEFINE_ENUM(I2C_SLAVE_WRITE_REQUESTED);
TRACE_DEFINE_ENUM(I2C_SLAVE_READ_PROCESSED);
TRACE_DEFINE_ENUM(I2C_SLAVE_WRITE_PROCESSED);
TRACE_DEFINE_ENUM(I2C_SLAVE_STOP);
before the TRACE_EVENT()
Got it. I'll add it to v3.
Thanks,
Jae