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