greybus: operation, core: hook tracepoints into message opertions
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Fri, 18 Sep 2015 15:38:45 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 18 Sep 2015 21:07:28 +0000 (14:07 -0700)
commit5c8ad599b942a9a027045e69fc76c84f23c0acf0
tree349c5dabf6cfe89e0869f031d4585654fc1747bd
parentbb03ed920166a1fa2df77d5ef96ff1d749fa2967
greybus: operation, core: hook tracepoints into message opertions

This patch hooks tracepoints for greybus messages

- trace_gb_message_send
- trace_gb_message_recv_request
- trace_gb_message_recv_response
- trace_gb_message_cancel_outgoing
- trace_gb_message_cancel_incoming

It provides standard tracepoints at

/sys/kernel/debug/tracing/events/greybus/gb_message_send
/sys/kernel/debug/tracing/events/greybus/gb_message_recv_response
/sys/kernel/debug/tracing/events/greybus/gb_message_recv_request
/sys/kernel/debug/tracing/events/greybus/gb_message_cancel_outgoing
/sys/kernel/debug/tracing/events/greybus/gb_message_cancel_incoming

Giving outputs like

gb_message_recv_request: greybus:1-1.1:0 op=0001 if_id=0000 hd_id=0000 l=2
gb_message_send: greybus:1-1.1:0 op=0001 if_id=0000 hd_id=0000 l=2

Similarly perf events can be viewed with standard perf tools e.g.

root@beaglebone:~# perf list 'greybus:*'
  greybus:gb_message_send                            [Tracepoint event]
  greybus:gb_message_recv_request                    [Tracepoint event]
  greybus:gb_message_recv_response                   [Tracepoint event]
  greybus:gb_message_cancel_outgoing                 [Tracepoint event]
  greybus:gb_message_cancel_incoming                 [Tracepoint event]

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/Makefile
drivers/staging/greybus/core.c
drivers/staging/greybus/operation.c