diff options
author | Chris Redpath <chris.redpath@arm.com> | 2013-10-11 11:45:01 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-10-11 15:07:18 +0100 |
commit | 5ecaba3d9f4ab514fe8d383534e24b306f116896 (patch) | |
tree | 9b35196c582b427400e8a910cd5c3686979e7cd3 /include | |
parent | 2353c1f8009c14e89b323b18ae246c485fc034e4 (diff) |
smp: smp_cross_call function pointer tracing
generic tracing for smp_cross_call function calls
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/smp.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/include/trace/events/smp.h b/include/trace/events/smp.h new file mode 100644 index 00000000000..c8abfd74472 --- /dev/null +++ b/include/trace/events/smp.h @@ -0,0 +1,91 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM smp + +#if !defined(_TRACE_SMP_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_SMP_H + +#include <linux/tracepoint.h> +typedef void (*__smp_call_func_t)(void *info); + +DECLARE_EVENT_CLASS(smp_call_class, + + TP_PROTO(__smp_call_func_t fnc), + + TP_ARGS(fnc), + + TP_STRUCT__entry( + __field( void *, func ) + ), + + TP_fast_assign( + __entry->func = fnc; + ), + + TP_printk("func=%pf", __entry->func) +); + +/** + * smp_call_func_entry - called in the generic smp-cross-call-handler + * immediately before calling the destination + * function + * @func: function pointer + * + * When used in combination with the smp_call_func_exit tracepoint + * we can determine the cross-call runtime. + */ +DEFINE_EVENT(smp_call_class, smp_call_func_entry, + + TP_PROTO(__smp_call_func_t fnc), + + TP_ARGS(fnc) +); + +/** + * smp_call_func_exit - called in the generic smp-cross-call-handler + * immediately after the destination function + * returns + * @func: function pointer + * + * When used in combination with the smp_call_entry tracepoint + * we can determine the cross-call runtime. + */ +DEFINE_EVENT(smp_call_class, smp_call_func_exit, + + TP_PROTO(__smp_call_func_t fnc), + + TP_ARGS(fnc) +); + +/** + * smp_call_func_send - called as destination function is set + * in the per-cpu storage + * @func: function pointer + * @dest: cpu to send to + * + * When used in combination with the smp_cross_call_entry tracepoint + * we can determine the call-to-run latency. + */ +TRACE_EVENT(smp_call_func_send, + + TP_PROTO(__smp_call_func_t func, int dest), + + TP_ARGS(func, dest), + + TP_STRUCT__entry( + __field( void * , func ) + __field( int , dest ) + ), + + TP_fast_assign( + __entry->func = func; + __entry->dest = dest; + ), + + TP_printk("dest=%d func=%pf", __entry->dest, + __entry->func) +); + +#endif /* _TRACE_SMP_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> |