diff options
author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2015-09-22 18:06:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-09-23 12:39:24 -0700 |
commit | 32b2b16737d40d0aea6e7a02740ce47acd4fdd2e (patch) | |
tree | cfb4ee46ddd5170b03077b198e4e9efb16887329 /drivers/staging/greybus/greybus_trace.h | |
parent | d090446a915f109e65f3b2643269b134e1ddb4ef (diff) | |
download | op-kernel-dev-32b2b16737d40d0aea6e7a02740ce47acd4fdd2e.zip op-kernel-dev-32b2b16737d40d0aea6e7a02740ce47acd4fdd2e.tar.gz |
greybus: tracepoints: add tracepoints for host_device tx/rx
This patch adds new tracepoint declarations to greybus_trace.h to allow for
capture of greybus host device tx and rx events. These two tracepoints
allow an observer to see the point where the hardware interface driver
performs the relevant read or write to receive or write the data it's been
given from the higher layer greybus driver.
The following two new tracepoints are declared:
- trace_gb_host_device_send
- trace_gb_host_device_recv
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_trace.h')
-rw-r--r-- | drivers/staging/greybus/greybus_trace.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/staging/greybus/greybus_trace.h index abceb3a..6c88d34 100644 --- a/drivers/staging/greybus/greybus_trace.h +++ b/drivers/staging/greybus/greybus_trace.h @@ -15,6 +15,7 @@ #include <linux/tracepoint.h> struct gb_message; +struct greybus_host_device; DECLARE_EVENT_CLASS(gb_message, @@ -105,6 +106,55 @@ DEFINE_EVENT(gb_message, gb_message_cancel_incoming, TP_ARGS(message) ); +DECLARE_EVENT_CLASS(gb_host_device, + + TP_PROTO(struct greybus_host_device *hd, u16 intf_cport_id, + size_t payload_size), + + TP_ARGS(hd, intf_cport_id, payload_size), + + TP_STRUCT__entry( + __string(name, dev_name(hd->parent)) + __field(u16, intf_cport_id) + __field(size_t, payload_size) + ), + + TP_fast_assign( + __assign_str(name, dev_name(hd->parent)) + __entry->intf_cport_id = intf_cport_id; + __entry->payload_size = payload_size; + ), + + TP_printk("greybus:%s if_id=%04x l=%zu", __get_str(name), + __entry->intf_cport_id, __entry->payload_size) +); + +/* + * tracepoint name greybus:gb_host_device_send + * description tracepoint representing the point data are transmitted + * location es1.c/es2.c:message_send + */ +DEFINE_EVENT(gb_host_device, gb_host_device_send, + + TP_PROTO(struct greybus_host_device *hd, u16 intf_cport_id, + size_t payload_size), + + TP_ARGS(hd, intf_cport_id, payload_size) +); + +/* + * tracepoint name greybus:gb_host_device_recv + * description tracepoint representing the point data are received + * location es1.c/es2.c:cport_in_callback + */ +DEFINE_EVENT(gb_host_device, gb_host_device_recv, + + TP_PROTO(struct greybus_host_device *hd, u16 intf_cport_id, + size_t payload_size), + + TP_ARGS(hd, intf_cport_id, payload_size) +); + #endif /* _TRACE_GREYBUS_H */ /* This part must be outside protection */ |