Commit | Line | Data |
---|---|---|
5ba9ac8e TG |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM cpuhp | |
3 | ||
4 | #if !defined(_TRACE_CPUHP_H) || defined(TRACE_HEADER_MULTI_READ) | |
5 | #define _TRACE_CPUHP_H | |
6 | ||
7 | #include <linux/tracepoint.h> | |
8 | ||
9 | TRACE_EVENT(cpuhp_enter, | |
10 | ||
11 | TP_PROTO(unsigned int cpu, | |
12 | int target, | |
13 | int idx, | |
14 | int (*fun)(unsigned int)), | |
15 | ||
16 | TP_ARGS(cpu, target, idx, fun), | |
17 | ||
18 | TP_STRUCT__entry( | |
19 | __field( unsigned int, cpu ) | |
20 | __field( int, target ) | |
21 | __field( int, idx ) | |
22 | __field( void *, fun ) | |
23 | ), | |
24 | ||
25 | TP_fast_assign( | |
26 | __entry->cpu = cpu; | |
27 | __entry->target = target; | |
28 | __entry->idx = idx; | |
29 | __entry->fun = fun; | |
30 | ), | |
31 | ||
32 | TP_printk("cpu: %04u target: %3d step: %3d (%pf)", | |
33 | __entry->cpu, __entry->target, __entry->idx, __entry->fun) | |
34 | ); | |
35 | ||
cf392d10 TG |
36 | TRACE_EVENT(cpuhp_multi_enter, |
37 | ||
38 | TP_PROTO(unsigned int cpu, | |
39 | int target, | |
40 | int idx, | |
41 | int (*fun)(unsigned int, struct hlist_node *), | |
42 | struct hlist_node *node), | |
43 | ||
44 | TP_ARGS(cpu, target, idx, fun, node), | |
45 | ||
46 | TP_STRUCT__entry( | |
47 | __field( unsigned int, cpu ) | |
48 | __field( int, target ) | |
49 | __field( int, idx ) | |
50 | __field( void *, fun ) | |
51 | ), | |
52 | ||
53 | TP_fast_assign( | |
54 | __entry->cpu = cpu; | |
55 | __entry->target = target; | |
56 | __entry->idx = idx; | |
57 | __entry->fun = fun; | |
58 | ), | |
59 | ||
60 | TP_printk("cpu: %04u target: %3d step: %3d (%pf)", | |
61 | __entry->cpu, __entry->target, __entry->idx, __entry->fun) | |
62 | ); | |
63 | ||
5ba9ac8e TG |
64 | TRACE_EVENT(cpuhp_exit, |
65 | ||
66 | TP_PROTO(unsigned int cpu, | |
67 | int state, | |
68 | int idx, | |
69 | int ret), | |
70 | ||
71 | TP_ARGS(cpu, state, idx, ret), | |
72 | ||
73 | TP_STRUCT__entry( | |
74 | __field( unsigned int, cpu ) | |
75 | __field( int, state ) | |
76 | __field( int, idx ) | |
77 | __field( int, ret ) | |
78 | ), | |
79 | ||
80 | TP_fast_assign( | |
81 | __entry->cpu = cpu; | |
82 | __entry->state = state; | |
83 | __entry->idx = idx; | |
84 | __entry->ret = ret; | |
85 | ), | |
86 | ||
87 | TP_printk(" cpu: %04u state: %3d step: %3d ret: %d", | |
88 | __entry->cpu, __entry->state, __entry->idx, __entry->ret) | |
89 | ); | |
90 | ||
91 | #endif | |
92 | ||
93 | /* This part must be outside protection */ | |
94 | #include <trace/define_trace.h> |