diff options
author | Alex Elder <elder@linaro.org> | 2016-06-03 15:55:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-03 17:03:23 -0700 |
commit | 0790c09a3bc987a22749b0fb9b3effa313b1ece7 (patch) | |
tree | ec158d1c6738a87ff0b69820809493be815ef788 /drivers/staging/greybus/greybus_trace.h | |
parent | 495787a792ac498843b25e5569597c24cd026f2b (diff) | |
download | op-kernel-dev-0790c09a3bc987a22749b0fb9b3effa313b1ece7.zip op-kernel-dev-0790c09a3bc987a22749b0fb9b3effa313b1ece7.tar.gz |
greybus: tracing: fix message traces
The original message trace events were defined long before the
recent tracing updates. It records information that's not
really directly related to a message. Change the information
recorded and reported for message events to just be the content
of the message header.
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@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 | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/staging/greybus/greybus_trace.h index 62f5803..342f5ad 100644 --- a/drivers/staging/greybus/greybus_trace.h +++ b/drivers/staging/greybus/greybus_trace.h @@ -20,11 +20,6 @@ struct gb_connection; struct gb_bundle; struct gb_host_device; -#define gb_bundle_name(message) \ - (message->operation->connection->bundle ? \ - dev_name(&message->operation->connection->bundle->dev) : \ - dev_name(&message->operation->connection->hd->svc->dev)) - DECLARE_EVENT_CLASS(gb_message, TP_PROTO(struct gb_message *message), @@ -32,26 +27,23 @@ DECLARE_EVENT_CLASS(gb_message, TP_ARGS(message), TP_STRUCT__entry( - __string(name, gb_bundle_name(message)) - __field(u16, op_id) - __field(u16, intf_cport_id) - __field(u16, hd_cport_id) - __field(size_t, payload_size) + __field(u16, size) + __field(u16, operation_id) + __field(u8, type) + __field(u8, result) ), TP_fast_assign( - __assign_str(name, gb_bundle_name(message)) - __entry->op_id = message->operation->id; - __entry->intf_cport_id = - message->operation->connection->intf_cport_id; - __entry->hd_cport_id = - message->operation->connection->hd_cport_id; - __entry->payload_size = message->payload_size; + __entry->size = le16_to_cpu(message->header->size); + __entry->operation_id = + le16_to_cpu(message->header->operation_id); + __entry->type = message->header->type; + __entry->result = message->header->result; ), - TP_printk("greybus:%s op=%04x if_id=%u hd_id=%u l=%zu", - __get_str(name), __entry->op_id, __entry->intf_cport_id, - __entry->hd_cport_id, __entry->payload_size) + TP_printk("greybus: size=%hu operation_id=0x%04x type=0x%02x result=0x%02x", + __entry->size, __entry->operation_id, + __entry->type, __entry->result) ); #define DEFINE_MESSAGE_EVENT(name) \ |