greybus: tracepoints: Add standard Linux tracepoint for TimeSync event
This patch adds a tracepoint to the TimeSync ISR, the purpose of which is
to indicate a TimeSync event has happened. This tracepoint can be enabled
by issuing the following command:
echo 1 > /sys/kernel/debug/tracing/events/greybus/gb_timesync_irq/enable
Synchronization looks like this:
TIMESTAMP FUNCTION
| |
147.865788: gb_timesync_irq: strobe 1/4 frame-time
2910076529
147.866781: gb_timesync_irq: strobe 2/4 frame-time
2910095689
147.867777: gb_timesync_irq: strobe 3/4 frame-time
2910114820
147.868791: gb_timesync_irq: strobe 4/4 frame-time
2910134038
A ping can be triggered like this:
cat /sys/kernel/debug/greybus/frame-time
And that ping looks like this:
TIMESTAMP FUNCTION
| |
147.934678: gb_timesync_irq: ping 4/4 frame-time
2911380356
169.280551: gb_timesync_irq: ping 4/4 frame-time
3321221069
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Acked-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>