Merge branch develop-3.10
[firefly-linux-kernel-4.4.55.git] / include / trace / events / smp.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM smp
3
4 #if !defined(_TRACE_SMP_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_SMP_H
6
7 #include <linux/tracepoint.h>
8
9 DECLARE_EVENT_CLASS(smp_call_class,
10
11         TP_PROTO(void * fnc),
12
13         TP_ARGS(fnc),
14
15         TP_STRUCT__entry(
16                 __field( void *, func )
17         ),
18
19         TP_fast_assign(
20                 __entry->func = fnc;
21         ),
22
23         TP_printk("func=%pf", __entry->func)
24 );
25
26 /**
27  * smp_call_func_entry - called in the generic smp-cross-call-handler
28  *                                               immediately before calling the destination
29  *                                               function
30  * @func:  function pointer
31  *
32  * When used in combination with the smp_call_func_exit tracepoint
33  * we can determine the cross-call runtime.
34  */
35 DEFINE_EVENT(smp_call_class, smp_call_func_entry,
36
37         TP_PROTO(void * fnc),
38
39         TP_ARGS(fnc)
40 );
41
42 /**
43  * smp_call_func_exit - called in the generic smp-cross-call-handler
44  *                                              immediately after the destination function
45  *                                              returns
46  * @func:  function pointer
47  *
48  * When used in combination with the smp_call_entry tracepoint
49  * we can determine the cross-call runtime.
50  */
51 DEFINE_EVENT(smp_call_class, smp_call_func_exit,
52
53         TP_PROTO(void * fnc),
54
55         TP_ARGS(fnc)
56 );
57
58 /**
59  * smp_call_func_send - called as destination function is set
60  *                                              in the per-cpu storage
61  * @func:  function pointer
62  * @dest:  cpu to send to
63  *
64  * When used in combination with the smp_cross_call_entry tracepoint
65  * we can determine the call-to-run latency.
66  */
67 TRACE_EVENT(smp_call_func_send,
68
69         TP_PROTO(void * func, int dest),
70
71         TP_ARGS(func, dest),
72
73         TP_STRUCT__entry(
74                 __field(        void *  ,       func )
75                 __field(        int             ,       dest )
76         ),
77
78         TP_fast_assign(
79                 __entry->func = func;
80                 __entry->dest = dest;
81         ),
82
83         TP_printk("dest=%d func=%pf", __entry->dest,
84                         __entry->func)
85 );
86
87 #endif /*  _TRACE_SMP_H */
88
89 /* This part must be outside protection */
90 #include <trace/define_trace.h>