xref: /openbmc/linux/include/trace/events/irq_matrix.h (revision 664b0bae0b87f69bc9deb098f5e0158b9cf18e04)
1*ec0f7cd2SThomas Gleixner #undef TRACE_SYSTEM
2*ec0f7cd2SThomas Gleixner #define TRACE_SYSTEM irq_matrix
3*ec0f7cd2SThomas Gleixner 
4*ec0f7cd2SThomas Gleixner #if !defined(_TRACE_IRQ_MATRIX_H) || defined(TRACE_HEADER_MULTI_READ)
5*ec0f7cd2SThomas Gleixner #define _TRACE_IRQ_MATRIX_H
6*ec0f7cd2SThomas Gleixner 
7*ec0f7cd2SThomas Gleixner #include <linux/tracepoint.h>
8*ec0f7cd2SThomas Gleixner 
9*ec0f7cd2SThomas Gleixner struct irq_matrix;
10*ec0f7cd2SThomas Gleixner struct cpumap;
11*ec0f7cd2SThomas Gleixner 
12*ec0f7cd2SThomas Gleixner DECLARE_EVENT_CLASS(irq_matrix_global,
13*ec0f7cd2SThomas Gleixner 
14*ec0f7cd2SThomas Gleixner 	TP_PROTO(struct irq_matrix *matrix),
15*ec0f7cd2SThomas Gleixner 
16*ec0f7cd2SThomas Gleixner 	TP_ARGS(matrix),
17*ec0f7cd2SThomas Gleixner 
18*ec0f7cd2SThomas Gleixner 	TP_STRUCT__entry(
19*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	online_maps		)
20*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_available	)
21*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_reserved		)
22*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	total_allocated		)
23*ec0f7cd2SThomas Gleixner 	),
24*ec0f7cd2SThomas Gleixner 
25*ec0f7cd2SThomas Gleixner 	TP_fast_assign(
26*ec0f7cd2SThomas Gleixner 		__entry->online_maps		= matrix->online_maps;
27*ec0f7cd2SThomas Gleixner 		__entry->global_available	= matrix->global_available;
28*ec0f7cd2SThomas Gleixner 		__entry->global_reserved	= matrix->global_reserved;
29*ec0f7cd2SThomas Gleixner 		__entry->total_allocated	= matrix->total_allocated;
30*ec0f7cd2SThomas Gleixner 	),
31*ec0f7cd2SThomas Gleixner 
32*ec0f7cd2SThomas Gleixner 	TP_printk("online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
33*ec0f7cd2SThomas Gleixner 		  __entry->online_maps, __entry->global_available,
34*ec0f7cd2SThomas Gleixner 		  __entry->global_reserved, __entry->total_allocated)
35*ec0f7cd2SThomas Gleixner );
36*ec0f7cd2SThomas Gleixner 
37*ec0f7cd2SThomas Gleixner DECLARE_EVENT_CLASS(irq_matrix_global_update,
38*ec0f7cd2SThomas Gleixner 
39*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, struct irq_matrix *matrix),
40*ec0f7cd2SThomas Gleixner 
41*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, matrix),
42*ec0f7cd2SThomas Gleixner 
43*ec0f7cd2SThomas Gleixner 	TP_STRUCT__entry(
44*ec0f7cd2SThomas Gleixner 		__field(	int,		bit			)
45*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	online_maps		)
46*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_available	)
47*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_reserved		)
48*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	total_allocated		)
49*ec0f7cd2SThomas Gleixner 	),
50*ec0f7cd2SThomas Gleixner 
51*ec0f7cd2SThomas Gleixner 	TP_fast_assign(
52*ec0f7cd2SThomas Gleixner 		__entry->bit			= bit;
53*ec0f7cd2SThomas Gleixner 		__entry->online_maps		= matrix->online_maps;
54*ec0f7cd2SThomas Gleixner 		__entry->global_available	= matrix->global_available;
55*ec0f7cd2SThomas Gleixner 		__entry->global_reserved	= matrix->global_reserved;
56*ec0f7cd2SThomas Gleixner 		__entry->total_allocated	= matrix->total_allocated;
57*ec0f7cd2SThomas Gleixner 	),
58*ec0f7cd2SThomas Gleixner 
59*ec0f7cd2SThomas Gleixner 	TP_printk("bit=%d online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
60*ec0f7cd2SThomas Gleixner 		  __entry->bit, __entry->online_maps,
61*ec0f7cd2SThomas Gleixner 		  __entry->global_available, __entry->global_reserved,
62*ec0f7cd2SThomas Gleixner 		  __entry->total_allocated)
63*ec0f7cd2SThomas Gleixner );
64*ec0f7cd2SThomas Gleixner 
65*ec0f7cd2SThomas Gleixner DECLARE_EVENT_CLASS(irq_matrix_cpu,
66*ec0f7cd2SThomas Gleixner 
67*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu, struct irq_matrix *matrix,
68*ec0f7cd2SThomas Gleixner 		 struct cpumap *cmap),
69*ec0f7cd2SThomas Gleixner 
70*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap),
71*ec0f7cd2SThomas Gleixner 
72*ec0f7cd2SThomas Gleixner 	TP_STRUCT__entry(
73*ec0f7cd2SThomas Gleixner 		__field(	int,		bit			)
74*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	cpu			)
75*ec0f7cd2SThomas Gleixner 		__field(	bool,		online			)
76*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	available		)
77*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	allocated		)
78*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	managed			)
79*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	online_maps		)
80*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_available	)
81*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	global_reserved		)
82*ec0f7cd2SThomas Gleixner 		__field(	unsigned int,	total_allocated		)
83*ec0f7cd2SThomas Gleixner 	),
84*ec0f7cd2SThomas Gleixner 
85*ec0f7cd2SThomas Gleixner 	TP_fast_assign(
86*ec0f7cd2SThomas Gleixner 		__entry->bit			= bit;
87*ec0f7cd2SThomas Gleixner 		__entry->cpu			= cpu;
88*ec0f7cd2SThomas Gleixner 		__entry->online			= cmap->online;
89*ec0f7cd2SThomas Gleixner 		__entry->available		= cmap->available;
90*ec0f7cd2SThomas Gleixner 		__entry->allocated		= cmap->allocated;
91*ec0f7cd2SThomas Gleixner 		__entry->managed		= cmap->managed;
92*ec0f7cd2SThomas Gleixner 		__entry->online_maps		= matrix->online_maps;
93*ec0f7cd2SThomas Gleixner 		__entry->global_available	= matrix->global_available;
94*ec0f7cd2SThomas Gleixner 		__entry->global_reserved	= matrix->global_reserved;
95*ec0f7cd2SThomas Gleixner 		__entry->total_allocated	= matrix->total_allocated;
96*ec0f7cd2SThomas Gleixner 	),
97*ec0f7cd2SThomas Gleixner 
98*ec0f7cd2SThomas Gleixner 	TP_printk("bit=%d cpu=%u online=%d avl=%u alloc=%u managed=%u online_maps=%u global_avl=%u, global_rsvd=%u, total_alloc=%u",
99*ec0f7cd2SThomas Gleixner 		  __entry->bit, __entry->cpu, __entry->online,
100*ec0f7cd2SThomas Gleixner 		  __entry->available, __entry->allocated,
101*ec0f7cd2SThomas Gleixner 		  __entry->managed, __entry->online_maps,
102*ec0f7cd2SThomas Gleixner 		  __entry->global_available, __entry->global_reserved,
103*ec0f7cd2SThomas Gleixner 		  __entry->total_allocated)
104*ec0f7cd2SThomas Gleixner );
105*ec0f7cd2SThomas Gleixner 
106*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_global, irq_matrix_online,
107*ec0f7cd2SThomas Gleixner 
108*ec0f7cd2SThomas Gleixner 	TP_PROTO(struct irq_matrix *matrix),
109*ec0f7cd2SThomas Gleixner 
110*ec0f7cd2SThomas Gleixner 	TP_ARGS(matrix)
111*ec0f7cd2SThomas Gleixner );
112*ec0f7cd2SThomas Gleixner 
113*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_global, irq_matrix_offline,
114*ec0f7cd2SThomas Gleixner 
115*ec0f7cd2SThomas Gleixner 	TP_PROTO(struct irq_matrix *matrix),
116*ec0f7cd2SThomas Gleixner 
117*ec0f7cd2SThomas Gleixner 	TP_ARGS(matrix)
118*ec0f7cd2SThomas Gleixner );
119*ec0f7cd2SThomas Gleixner 
120*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_global, irq_matrix_reserve,
121*ec0f7cd2SThomas Gleixner 
122*ec0f7cd2SThomas Gleixner 	TP_PROTO(struct irq_matrix *matrix),
123*ec0f7cd2SThomas Gleixner 
124*ec0f7cd2SThomas Gleixner 	TP_ARGS(matrix)
125*ec0f7cd2SThomas Gleixner );
126*ec0f7cd2SThomas Gleixner 
127*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_global, irq_matrix_remove_reserved,
128*ec0f7cd2SThomas Gleixner 
129*ec0f7cd2SThomas Gleixner 	TP_PROTO(struct irq_matrix *matrix),
130*ec0f7cd2SThomas Gleixner 
131*ec0f7cd2SThomas Gleixner 	TP_ARGS(matrix)
132*ec0f7cd2SThomas Gleixner );
133*ec0f7cd2SThomas Gleixner 
134*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
135*ec0f7cd2SThomas Gleixner 
136*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, struct irq_matrix *matrix),
137*ec0f7cd2SThomas Gleixner 
138*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, matrix)
139*ec0f7cd2SThomas Gleixner );
140*ec0f7cd2SThomas Gleixner 
141*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
142*ec0f7cd2SThomas Gleixner 
143*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
144*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
145*ec0f7cd2SThomas Gleixner 
146*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
147*ec0f7cd2SThomas Gleixner );
148*ec0f7cd2SThomas Gleixner 
149*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
150*ec0f7cd2SThomas Gleixner 
151*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
152*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
153*ec0f7cd2SThomas Gleixner 
154*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
155*ec0f7cd2SThomas Gleixner );
156*ec0f7cd2SThomas Gleixner 
157*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_remove_managed,
158*ec0f7cd2SThomas Gleixner 
159*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
160*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
161*ec0f7cd2SThomas Gleixner 
162*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
163*ec0f7cd2SThomas Gleixner );
164*ec0f7cd2SThomas Gleixner 
165*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_managed,
166*ec0f7cd2SThomas Gleixner 
167*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
168*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
169*ec0f7cd2SThomas Gleixner 
170*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
171*ec0f7cd2SThomas Gleixner );
172*ec0f7cd2SThomas Gleixner 
173*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_assign,
174*ec0f7cd2SThomas Gleixner 
175*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
176*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
177*ec0f7cd2SThomas Gleixner 
178*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
179*ec0f7cd2SThomas Gleixner );
180*ec0f7cd2SThomas Gleixner 
181*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc,
182*ec0f7cd2SThomas Gleixner 
183*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
184*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
185*ec0f7cd2SThomas Gleixner 
186*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
187*ec0f7cd2SThomas Gleixner );
188*ec0f7cd2SThomas Gleixner 
189*ec0f7cd2SThomas Gleixner DEFINE_EVENT(irq_matrix_cpu, irq_matrix_free,
190*ec0f7cd2SThomas Gleixner 
191*ec0f7cd2SThomas Gleixner 	TP_PROTO(int bit, unsigned int cpu,
192*ec0f7cd2SThomas Gleixner 		 struct irq_matrix *matrix, struct cpumap *cmap),
193*ec0f7cd2SThomas Gleixner 
194*ec0f7cd2SThomas Gleixner 	TP_ARGS(bit, cpu, matrix, cmap)
195*ec0f7cd2SThomas Gleixner );
196*ec0f7cd2SThomas Gleixner 
197*ec0f7cd2SThomas Gleixner 
198*ec0f7cd2SThomas Gleixner #endif /*  _TRACE_IRQ_H */
199*ec0f7cd2SThomas Gleixner 
200*ec0f7cd2SThomas Gleixner /* This part must be outside protection */
201*ec0f7cd2SThomas Gleixner #include <trace/define_trace.h>
202