Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / timer_migration.h
blob47db5eaf2f9ab75669abb54162d4e6ea55f0ee0d
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #undef TRACE_SYSTEM
4 #define TRACE_SYSTEM timer_migration
6 #if !defined(_TRACE_TIMER_MIGRATION_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_TIMER_MIGRATION_H
9 #include <linux/tracepoint.h>
11 /* Group events */
12 TRACE_EVENT(tmigr_group_set,
14 TP_PROTO(struct tmigr_group *group),
16 TP_ARGS(group),
18 TP_STRUCT__entry(
19 __field( void *, group )
20 __field( unsigned int, lvl )
21 __field( unsigned int, numa_node )
24 TP_fast_assign(
25 __entry->group = group;
26 __entry->lvl = group->level;
27 __entry->numa_node = group->numa_node;
30 TP_printk("group=%p lvl=%d numa=%d",
31 __entry->group, __entry->lvl, __entry->numa_node)
34 TRACE_EVENT(tmigr_connect_child_parent,
36 TP_PROTO(struct tmigr_group *child),
38 TP_ARGS(child),
40 TP_STRUCT__entry(
41 __field( void *, child )
42 __field( void *, parent )
43 __field( unsigned int, lvl )
44 __field( unsigned int, numa_node )
45 __field( unsigned int, num_children )
46 __field( u32, groupmask )
49 TP_fast_assign(
50 __entry->child = child;
51 __entry->parent = child->parent;
52 __entry->lvl = child->parent->level;
53 __entry->numa_node = child->parent->numa_node;
54 __entry->num_children = child->parent->num_children;
55 __entry->groupmask = child->groupmask;
58 TP_printk("group=%p groupmask=%0x parent=%p lvl=%d numa=%d num_children=%d",
59 __entry->child, __entry->groupmask, __entry->parent,
60 __entry->lvl, __entry->numa_node, __entry->num_children)
63 TRACE_EVENT(tmigr_connect_cpu_parent,
65 TP_PROTO(struct tmigr_cpu *tmc),
67 TP_ARGS(tmc),
69 TP_STRUCT__entry(
70 __field( void *, parent )
71 __field( unsigned int, cpu )
72 __field( unsigned int, lvl )
73 __field( unsigned int, numa_node )
74 __field( unsigned int, num_children )
75 __field( u32, groupmask )
78 TP_fast_assign(
79 __entry->parent = tmc->tmgroup;
80 __entry->cpu = tmc->cpuevt.cpu;
81 __entry->lvl = tmc->tmgroup->level;
82 __entry->numa_node = tmc->tmgroup->numa_node;
83 __entry->num_children = tmc->tmgroup->num_children;
84 __entry->groupmask = tmc->groupmask;
87 TP_printk("cpu=%d groupmask=%0x parent=%p lvl=%d numa=%d num_children=%d",
88 __entry->cpu, __entry->groupmask, __entry->parent,
89 __entry->lvl, __entry->numa_node, __entry->num_children)
92 DECLARE_EVENT_CLASS(tmigr_group_and_cpu,
94 TP_PROTO(struct tmigr_group *group, union tmigr_state state, u32 childmask),
96 TP_ARGS(group, state, childmask),
98 TP_STRUCT__entry(
99 __field( void *, group )
100 __field( void *, parent )
101 __field( unsigned int, lvl )
102 __field( unsigned int, numa_node )
103 __field( u32, childmask )
104 __field( u8, active )
105 __field( u8, migrator )
108 TP_fast_assign(
109 __entry->group = group;
110 __entry->parent = group->parent;
111 __entry->lvl = group->level;
112 __entry->numa_node = group->numa_node;
113 __entry->childmask = childmask;
114 __entry->active = state.active;
115 __entry->migrator = state.migrator;
118 TP_printk("group=%p lvl=%d numa=%d active=%0x migrator=%0x "
119 "parent=%p childmask=%0x",
120 __entry->group, __entry->lvl, __entry->numa_node,
121 __entry->active, __entry->migrator,
122 __entry->parent, __entry->childmask)
125 DEFINE_EVENT(tmigr_group_and_cpu, tmigr_group_set_cpu_inactive,
127 TP_PROTO(struct tmigr_group *group, union tmigr_state state, u32 childmask),
129 TP_ARGS(group, state, childmask)
132 DEFINE_EVENT(tmigr_group_and_cpu, tmigr_group_set_cpu_active,
134 TP_PROTO(struct tmigr_group *group, union tmigr_state state, u32 childmask),
136 TP_ARGS(group, state, childmask)
139 /* CPU events*/
140 DECLARE_EVENT_CLASS(tmigr_cpugroup,
142 TP_PROTO(struct tmigr_cpu *tmc),
144 TP_ARGS(tmc),
146 TP_STRUCT__entry(
147 __field( u64, wakeup )
148 __field( void *, parent )
149 __field( unsigned int, cpu )
153 TP_fast_assign(
154 __entry->wakeup = tmc->wakeup;
155 __entry->parent = tmc->tmgroup;
156 __entry->cpu = tmc->cpuevt.cpu;
159 TP_printk("cpu=%d parent=%p wakeup=%llu", __entry->cpu, __entry->parent, __entry->wakeup)
162 DEFINE_EVENT(tmigr_cpugroup, tmigr_cpu_new_timer,
164 TP_PROTO(struct tmigr_cpu *tmc),
166 TP_ARGS(tmc)
169 DEFINE_EVENT(tmigr_cpugroup, tmigr_cpu_active,
171 TP_PROTO(struct tmigr_cpu *tmc),
173 TP_ARGS(tmc)
176 DEFINE_EVENT(tmigr_cpugroup, tmigr_cpu_online,
178 TP_PROTO(struct tmigr_cpu *tmc),
180 TP_ARGS(tmc)
183 DEFINE_EVENT(tmigr_cpugroup, tmigr_cpu_offline,
185 TP_PROTO(struct tmigr_cpu *tmc),
187 TP_ARGS(tmc)
190 DEFINE_EVENT(tmigr_cpugroup, tmigr_handle_remote_cpu,
192 TP_PROTO(struct tmigr_cpu *tmc),
194 TP_ARGS(tmc)
197 DECLARE_EVENT_CLASS(tmigr_idle,
199 TP_PROTO(struct tmigr_cpu *tmc, u64 nextevt),
201 TP_ARGS(tmc, nextevt),
203 TP_STRUCT__entry(
204 __field( u64, nextevt)
205 __field( u64, wakeup)
206 __field( void *, parent)
207 __field( unsigned int, cpu)
210 TP_fast_assign(
211 __entry->nextevt = nextevt;
212 __entry->wakeup = tmc->wakeup;
213 __entry->parent = tmc->tmgroup;
214 __entry->cpu = tmc->cpuevt.cpu;
217 TP_printk("cpu=%d parent=%p nextevt=%llu wakeup=%llu",
218 __entry->cpu, __entry->parent, __entry->nextevt, __entry->wakeup)
221 DEFINE_EVENT(tmigr_idle, tmigr_cpu_idle,
223 TP_PROTO(struct tmigr_cpu *tmc, u64 nextevt),
225 TP_ARGS(tmc, nextevt)
228 DEFINE_EVENT(tmigr_idle, tmigr_cpu_new_timer_idle,
230 TP_PROTO(struct tmigr_cpu *tmc, u64 nextevt),
232 TP_ARGS(tmc, nextevt)
235 TRACE_EVENT(tmigr_update_events,
237 TP_PROTO(struct tmigr_group *child, struct tmigr_group *group,
238 union tmigr_state childstate, union tmigr_state groupstate,
239 u64 nextevt),
241 TP_ARGS(child, group, childstate, groupstate, nextevt),
243 TP_STRUCT__entry(
244 __field( void *, child )
245 __field( void *, group )
246 __field( u64, nextevt )
247 __field( u64, group_next_expiry )
248 __field( u64, child_evt_expiry )
249 __field( unsigned int, group_lvl )
250 __field( unsigned int, child_evtcpu )
251 __field( u8, child_active )
252 __field( u8, group_active )
255 TP_fast_assign(
256 __entry->child = child;
257 __entry->group = group;
258 __entry->nextevt = nextevt;
259 __entry->group_next_expiry = group->next_expiry;
260 __entry->child_evt_expiry = child ? child->groupevt.nextevt.expires : 0;
261 __entry->group_lvl = group->level;
262 __entry->child_evtcpu = child ? child->groupevt.cpu : 0;
263 __entry->child_active = childstate.active;
264 __entry->group_active = groupstate.active;
267 TP_printk("child=%p group=%p group_lvl=%d child_active=%0x group_active=%0x "
268 "nextevt=%llu next_expiry=%llu child_evt_expiry=%llu child_evtcpu=%d",
269 __entry->child, __entry->group, __entry->group_lvl, __entry->child_active,
270 __entry->group_active,
271 __entry->nextevt, __entry->group_next_expiry, __entry->child_evt_expiry,
272 __entry->child_evtcpu)
275 TRACE_EVENT(tmigr_handle_remote,
277 TP_PROTO(struct tmigr_group *group),
279 TP_ARGS(group),
281 TP_STRUCT__entry(
282 __field( void * , group )
283 __field( unsigned int , lvl )
286 TP_fast_assign(
287 __entry->group = group;
288 __entry->lvl = group->level;
291 TP_printk("group=%p lvl=%d",
292 __entry->group, __entry->lvl)
295 #endif /* _TRACE_TIMER_MIGRATION_H */
297 /* This part must be outside protection */
298 #include <trace/define_trace.h>