Commit | Line | Data |
---|---|---|
b87700e3 AG |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM rcu | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_RCU_H | |
b87700e3 | 6 | |
6ec43db8 | 7 | #include <probes/lttng-tracepoint-event.h> |
b87700e3 AG |
8 | #include <linux/version.h> |
9 | ||
10 | /* | |
11 | * Tracepoint for start/end markers used for utilization calculations. | |
12 | * By convention, the string is of the following forms: | |
13 | * | |
14 | * "Start <activity>" -- Mark the start of the specified activity, | |
15 | * such as "context switch". Nesting is permitted. | |
16 | * "End <activity>" -- Mark the end of the specified activity. | |
17 | * | |
18 | * An "@" character within "<activity>" is a comment character: Data | |
19 | * reduction scripts will ignore the "@" and the remainder of the line. | |
20 | */ | |
3bc29f0a | 21 | LTTNG_TRACEPOINT_EVENT(rcu_utilization, |
b87700e3 | 22 | |
8e621312 MD |
23 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
24 | TP_PROTO(const char *s), | |
25 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ | |
b87700e3 | 26 | TP_PROTO(char *s), |
8e621312 | 27 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ |
b87700e3 AG |
28 | |
29 | TP_ARGS(s), | |
30 | ||
f127e61e MD |
31 | TP_FIELDS( |
32 | ctf_string(s, s) | |
33 | ) | |
b87700e3 AG |
34 | ) |
35 | ||
36 | #ifdef CONFIG_RCU_TRACE | |
37 | ||
12318fb8 MD |
38 | #if defined(CONFIG_TREE_RCU) \ |
39 | || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \ | |
40 | && defined(CONFIG_PREEMPT_RCU)) \ | |
41 | || defined(CONFIG_TREE_PREEMPT_RCU) | |
b87700e3 AG |
42 | |
43 | /* | |
44 | * Tracepoint for grace-period events: starting and ending a grace | |
45 | * period ("start" and "end", respectively), a CPU noting the start | |
46 | * of a new grace period or the end of an old grace period ("cpustart" | |
47 | * and "cpuend", respectively), a CPU passing through a quiescent | |
48 | * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" | |
49 | * and "cpuofl", respectively), and a CPU being kicked for being too | |
50 | * long in dyntick-idle mode ("kick"). | |
51 | */ | |
ae8ff4cd MJ |
52 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
53 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period, | |
54 | ||
55 | TP_PROTO(const char *rcuname, unsigned long gp_seq, const char *gpevent), | |
56 | ||
57 | TP_ARGS(rcuname, gp_seq, gpevent), | |
58 | ||
59 | TP_FIELDS( | |
60 | ctf_string(rcuname, rcuname) | |
61 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
62 | ctf_string(gpevent, gpevent) | |
63 | ) | |
64 | ) | |
65 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 66 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period, |
b87700e3 | 67 | |
01adf18e | 68 | TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent), |
ae8ff4cd MJ |
69 | |
70 | TP_ARGS(rcuname, gpnum, gpevent), | |
71 | ||
72 | TP_FIELDS( | |
73 | ctf_string(rcuname, rcuname) | |
74 | ctf_integer(unsigned long, gpnum, gpnum) | |
75 | ctf_string(gpevent, gpevent) | |
76 | ) | |
77 | ) | |
78 | #else | |
79 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period, | |
80 | ||
b87700e3 AG |
81 | TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), |
82 | ||
83 | TP_ARGS(rcuname, gpnum, gpevent), | |
84 | ||
f127e61e MD |
85 | TP_FIELDS( |
86 | ctf_string(rcuname, rcuname) | |
87 | ctf_integer(unsigned long, gpnum, gpnum) | |
88 | ctf_string(gpevent, gpevent) | |
89 | ) | |
b87700e3 | 90 | ) |
ae8ff4cd | 91 | #endif |
b87700e3 AG |
92 | |
93 | /* | |
94 | * Tracepoint for grace-period-initialization events. These are | |
95 | * distinguished by the type of RCU, the new grace-period number, the | |
96 | * rcu_node structure level, the starting and ending CPU covered by the | |
97 | * rcu_node structure, and the mask of CPUs that will be waited for. | |
98 | * All but the type of RCU are extracted from the rcu_node structure. | |
99 | */ | |
ae8ff4cd MJ |
100 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
101 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, | |
102 | ||
103 | TP_PROTO(const char *rcuname, unsigned long gp_seq, u8 level, | |
104 | int grplo, int grphi, unsigned long qsmask), | |
105 | ||
106 | TP_ARGS(rcuname, gp_seq, level, grplo, grphi, qsmask), | |
107 | ||
108 | TP_FIELDS( | |
109 | ctf_string(rcuname, rcuname) | |
110 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
111 | ctf_integer(u8, level, level) | |
112 | ctf_integer(int, grplo, grplo) | |
113 | ctf_integer(int, grphi, grphi) | |
114 | ctf_integer(unsigned long, qsmask, qsmask) | |
115 | ) | |
116 | ) | |
117 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 118 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, |
b87700e3 | 119 | |
01adf18e MD |
120 | TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level, |
121 | int grplo, int grphi, unsigned long qsmask), | |
ae8ff4cd MJ |
122 | |
123 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), | |
124 | ||
125 | TP_FIELDS( | |
126 | ctf_string(rcuname, rcuname) | |
127 | ctf_integer(unsigned long, gpnum, gpnum) | |
128 | ctf_integer(u8, level, level) | |
129 | ctf_integer(int, grplo, grplo) | |
130 | ctf_integer(int, grphi, grphi) | |
131 | ctf_integer(unsigned long, qsmask, qsmask) | |
132 | ) | |
133 | ) | |
134 | #else | |
135 | LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init, | |
136 | ||
b87700e3 AG |
137 | TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, |
138 | int grplo, int grphi, unsigned long qsmask), | |
139 | ||
140 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), | |
141 | ||
f127e61e MD |
142 | TP_FIELDS( |
143 | ctf_string(rcuname, rcuname) | |
144 | ctf_integer(unsigned long, gpnum, gpnum) | |
145 | ctf_integer(u8, level, level) | |
146 | ctf_integer(int, grplo, grplo) | |
147 | ctf_integer(int, grphi, grphi) | |
148 | ctf_integer(unsigned long, qsmask, qsmask) | |
149 | ) | |
b87700e3 | 150 | ) |
ae8ff4cd | 151 | #endif |
b87700e3 AG |
152 | |
153 | /* | |
154 | * Tracepoint for tasks blocking within preemptible-RCU read-side | |
155 | * critical sections. Track the type of RCU (which one day might | |
156 | * include SRCU), the grace-period number that the task is blocking | |
157 | * (the current or the next), and the task's PID. | |
158 | */ | |
ae8ff4cd MJ |
159 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
160 | LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, | |
161 | ||
162 | TP_PROTO(const char *rcuname, int pid, unsigned long gp_seq), | |
163 | ||
164 | TP_ARGS(rcuname, pid, gp_seq), | |
165 | ||
166 | TP_FIELDS( | |
167 | ctf_string(rcuname, rcuname) | |
168 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
169 | ctf_integer(int, pid, pid) | |
170 | ) | |
171 | ) | |
172 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 173 | LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, |
b87700e3 | 174 | |
01adf18e | 175 | TP_PROTO(const char *rcuname, int pid, unsigned long gpnum), |
ae8ff4cd MJ |
176 | |
177 | TP_ARGS(rcuname, pid, gpnum), | |
178 | ||
179 | TP_FIELDS( | |
180 | ctf_string(rcuname, rcuname) | |
181 | ctf_integer(unsigned long, gpnum, gpnum) | |
182 | ctf_integer(int, pid, pid) | |
183 | ) | |
184 | ) | |
185 | #else | |
186 | LTTNG_TRACEPOINT_EVENT(rcu_preempt_task, | |
187 | ||
b87700e3 AG |
188 | TP_PROTO(char *rcuname, int pid, unsigned long gpnum), |
189 | ||
190 | TP_ARGS(rcuname, pid, gpnum), | |
191 | ||
f127e61e MD |
192 | TP_FIELDS( |
193 | ctf_string(rcuname, rcuname) | |
194 | ctf_integer(unsigned long, gpnum, gpnum) | |
195 | ctf_integer(int, pid, pid) | |
196 | ) | |
b87700e3 | 197 | ) |
ae8ff4cd | 198 | #endif |
b87700e3 AG |
199 | |
200 | /* | |
201 | * Tracepoint for tasks that blocked within a given preemptible-RCU | |
202 | * read-side critical section exiting that critical section. Track the | |
203 | * type of RCU (which one day might include SRCU) and the task's PID. | |
204 | */ | |
ae8ff4cd MJ |
205 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
206 | LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, | |
207 | ||
208 | TP_PROTO(const char *rcuname, unsigned long gp_seq, int pid), | |
209 | ||
210 | TP_ARGS(rcuname, gp_seq, pid), | |
211 | ||
212 | TP_FIELDS( | |
213 | ctf_string(rcuname, rcuname) | |
214 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
215 | ctf_integer(int, pid, pid) | |
216 | ) | |
217 | ) | |
218 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 219 | LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, |
b87700e3 | 220 | |
01adf18e | 221 | TP_PROTO(const char *rcuname, unsigned long gpnum, int pid), |
ae8ff4cd MJ |
222 | |
223 | TP_ARGS(rcuname, gpnum, pid), | |
224 | ||
225 | TP_FIELDS( | |
226 | ctf_string(rcuname, rcuname) | |
227 | ctf_integer(unsigned long, gpnum, gpnum) | |
228 | ctf_integer(int, pid, pid) | |
229 | ) | |
230 | ) | |
231 | #else | |
232 | LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task, | |
233 | ||
b87700e3 AG |
234 | TP_PROTO(char *rcuname, unsigned long gpnum, int pid), |
235 | ||
236 | TP_ARGS(rcuname, gpnum, pid), | |
237 | ||
f127e61e MD |
238 | TP_FIELDS( |
239 | ctf_string(rcuname, rcuname) | |
240 | ctf_integer(unsigned long, gpnum, gpnum) | |
241 | ctf_integer(int, pid, pid) | |
242 | ) | |
b87700e3 | 243 | ) |
ae8ff4cd | 244 | #endif |
b87700e3 AG |
245 | |
246 | /* | |
247 | * Tracepoint for quiescent-state-reporting events. These are | |
248 | * distinguished by the type of RCU, the grace-period number, the | |
249 | * mask of quiescent lower-level entities, the rcu_node structure level, | |
250 | * the starting and ending CPU covered by the rcu_node structure, and | |
251 | * whether there are any blocked tasks blocking the current grace period. | |
252 | * All but the type of RCU are extracted from the rcu_node structure. | |
253 | */ | |
ae8ff4cd MJ |
254 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
255 | LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, | |
256 | ||
257 | TP_PROTO(const char *rcuname, unsigned long gp_seq, | |
258 | unsigned long mask, unsigned long qsmask, | |
259 | u8 level, int grplo, int grphi, int gp_tasks), | |
260 | ||
261 | TP_ARGS(rcuname, gp_seq, mask, qsmask, level, grplo, grphi, gp_tasks), | |
262 | ||
263 | TP_FIELDS( | |
264 | ctf_string(rcuname, rcuname) | |
265 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
266 | ctf_integer(unsigned long, mask, mask) | |
267 | ctf_integer(unsigned long, qsmask, qsmask) | |
268 | ctf_integer(u8, level, level) | |
269 | ctf_integer(int, grplo, grplo) | |
270 | ctf_integer(int, grphi, grphi) | |
271 | ctf_integer(u8, gp_tasks, gp_tasks) | |
272 | ) | |
273 | ) | |
274 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 275 | LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, |
b87700e3 | 276 | |
01adf18e MD |
277 | TP_PROTO(const char *rcuname, unsigned long gpnum, |
278 | unsigned long mask, unsigned long qsmask, | |
279 | u8 level, int grplo, int grphi, int gp_tasks), | |
ae8ff4cd MJ |
280 | |
281 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), | |
282 | ||
283 | TP_FIELDS( | |
284 | ctf_string(rcuname, rcuname) | |
285 | ctf_integer(unsigned long, gpnum, gpnum) | |
286 | ctf_integer(unsigned long, mask, mask) | |
287 | ctf_integer(unsigned long, qsmask, qsmask) | |
288 | ctf_integer(u8, level, level) | |
289 | ctf_integer(int, grplo, grplo) | |
290 | ctf_integer(int, grphi, grphi) | |
291 | ctf_integer(u8, gp_tasks, gp_tasks) | |
292 | ) | |
293 | ) | |
294 | #else | |
295 | LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report, | |
296 | ||
b87700e3 AG |
297 | TP_PROTO(char *rcuname, unsigned long gpnum, |
298 | unsigned long mask, unsigned long qsmask, | |
299 | u8 level, int grplo, int grphi, int gp_tasks), | |
300 | ||
301 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), | |
302 | ||
f127e61e MD |
303 | TP_FIELDS( |
304 | ctf_string(rcuname, rcuname) | |
305 | ctf_integer(unsigned long, gpnum, gpnum) | |
306 | ctf_integer(unsigned long, mask, mask) | |
307 | ctf_integer(unsigned long, qsmask, qsmask) | |
308 | ctf_integer(u8, level, level) | |
309 | ctf_integer(int, grplo, grplo) | |
310 | ctf_integer(int, grphi, grphi) | |
311 | ctf_integer(u8, gp_tasks, gp_tasks) | |
312 | ) | |
b87700e3 | 313 | ) |
ae8ff4cd | 314 | #endif |
b87700e3 AG |
315 | |
316 | /* | |
317 | * Tracepoint for quiescent states detected by force_quiescent_state(). | |
318 | * These trace events include the type of RCU, the grace-period number | |
319 | * that was blocked by the CPU, the CPU itself, and the type of quiescent | |
320 | * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline, | |
321 | * or "kick" when kicking a CPU that has been in dyntick-idle mode for | |
322 | * too long. | |
323 | */ | |
ae8ff4cd MJ |
324 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
325 | LTTNG_TRACEPOINT_EVENT(rcu_fqs, | |
326 | ||
327 | TP_PROTO(const char *rcuname, unsigned long gp_seq, int cpu, const char *qsevent), | |
328 | ||
329 | TP_ARGS(rcuname, gp_seq, cpu, qsevent), | |
330 | ||
331 | TP_FIELDS( | |
332 | ctf_integer(unsigned long, gp_seq, gp_seq) | |
333 | ctf_integer(int, cpu, cpu) | |
334 | ctf_string(rcuname, rcuname) | |
335 | ctf_string(qsevent, qsevent) | |
336 | ) | |
337 | ) | |
338 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 339 | LTTNG_TRACEPOINT_EVENT(rcu_fqs, |
b87700e3 | 340 | |
01adf18e | 341 | TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent), |
ae8ff4cd MJ |
342 | |
343 | TP_ARGS(rcuname, gpnum, cpu, qsevent), | |
344 | ||
345 | TP_FIELDS( | |
346 | ctf_integer(unsigned long, gpnum, gpnum) | |
347 | ctf_integer(int, cpu, cpu) | |
348 | ctf_string(rcuname, rcuname) | |
349 | ctf_string(qsevent, qsevent) | |
350 | ) | |
351 | ) | |
352 | #else | |
353 | LTTNG_TRACEPOINT_EVENT(rcu_fqs, | |
354 | ||
b87700e3 AG |
355 | TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), |
356 | ||
357 | TP_ARGS(rcuname, gpnum, cpu, qsevent), | |
358 | ||
f127e61e MD |
359 | TP_FIELDS( |
360 | ctf_integer(unsigned long, gpnum, gpnum) | |
361 | ctf_integer(int, cpu, cpu) | |
362 | ctf_string(rcuname, rcuname) | |
363 | ctf_string(qsevent, qsevent) | |
364 | ) | |
b87700e3 | 365 | ) |
ae8ff4cd | 366 | #endif |
b87700e3 | 367 | |
12318fb8 MD |
368 | #endif /* |
369 | * #if defined(CONFIG_TREE_RCU) | |
370 | * || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) | |
371 | * && defined(CONFIG_PREEMPT_RCU)) | |
372 | * || defined(CONFIG_TREE_PREEMPT_RCU) | |
373 | */ | |
b87700e3 AG |
374 | |
375 | /* | |
376 | * Tracepoint for dyntick-idle entry/exit events. These take a string | |
377 | * as argument: "Start" for entering dyntick-idle mode, "End" for | |
378 | * leaving it, "--=" for events moving towards idle, and "++=" for events | |
379 | * moving away from idle. "Error on entry: not idle task" and "Error on | |
380 | * exit: not idle task" indicate that a non-idle task is erroneously | |
381 | * toying with the idle loop. | |
382 | * | |
383 | * These events also take a pair of numbers, which indicate the nesting | |
384 | * depth before and after the event of interest. Note that task-related | |
385 | * events use the upper bits of each number, while interrupt-related | |
386 | * events use the lower bits. | |
387 | */ | |
2cdc2db7 MJ |
388 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) |
389 | LTTNG_TRACEPOINT_EVENT(rcu_dyntick, | |
390 | ||
391 | TP_PROTO(const char *polarity, long oldnesting, long newnesting, int dynticks), | |
392 | ||
393 | TP_ARGS(polarity, oldnesting, newnesting, dynticks), | |
394 | ||
395 | TP_FIELDS( | |
396 | ctf_string(polarity, polarity) | |
397 | ctf_integer(long, oldnesting, oldnesting) | |
398 | ctf_integer(long, newnesting, newnesting) | |
399 | ctf_integer(int, dynticks, dynticks) | |
400 | ) | |
401 | ) | |
402 | ||
403 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) | |
3bc29f0a | 404 | LTTNG_TRACEPOINT_EVENT(rcu_dyntick, |
b87700e3 | 405 | |
8c7865d5 MJ |
406 | TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks), |
407 | ||
408 | TP_ARGS(polarity, oldnesting, newnesting, dynticks), | |
409 | ||
410 | TP_FIELDS( | |
411 | ctf_string(polarity, polarity) | |
412 | ctf_integer(long, oldnesting, oldnesting) | |
413 | ctf_integer(long, newnesting, newnesting) | |
414 | ctf_integer(int, dynticks, atomic_read(&dynticks)) | |
415 | ) | |
416 | ) | |
417 | ||
418 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
419 | LTTNG_TRACEPOINT_EVENT(rcu_dyntick, | |
01adf18e | 420 | |
01adf18e MD |
421 | TP_PROTO(const char *polarity, long long oldnesting, long long newnesting), |
422 | ||
423 | TP_ARGS(polarity, oldnesting, newnesting), | |
8c7865d5 MJ |
424 | |
425 | TP_FIELDS( | |
426 | ctf_string(polarity, polarity) | |
427 | ctf_integer(long long, oldnesting, oldnesting) | |
428 | ctf_integer(long long, newnesting, newnesting) | |
429 | ) | |
430 | ) | |
01adf18e | 431 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) |
8c7865d5 MJ |
432 | LTTNG_TRACEPOINT_EVENT(rcu_dyntick, |
433 | ||
b87700e3 AG |
434 | TP_PROTO(char *polarity, long long oldnesting, long long newnesting), |
435 | ||
436 | TP_ARGS(polarity, oldnesting, newnesting), | |
8c7865d5 MJ |
437 | |
438 | TP_FIELDS( | |
439 | ctf_string(polarity, polarity) | |
440 | ctf_integer(long long, oldnesting, oldnesting) | |
441 | ctf_integer(long long, newnesting, newnesting) | |
442 | ) | |
443 | ) | |
b87700e3 | 444 | #else |
8c7865d5 MJ |
445 | LTTNG_TRACEPOINT_EVENT(rcu_dyntick, |
446 | ||
b87700e3 AG |
447 | TP_PROTO(char *polarity), |
448 | ||
449 | TP_ARGS(polarity), | |
b87700e3 | 450 | |
f127e61e MD |
451 | TP_FIELDS( |
452 | ctf_string(polarity, polarity) | |
f127e61e | 453 | ) |
b87700e3 | 454 | ) |
8c7865d5 MJ |
455 | #endif |
456 | ||
b87700e3 AG |
457 | |
458 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
459 | /* | |
460 | * Tracepoint for RCU preparation for idle, the goal being to get RCU | |
461 | * processing done so that the current CPU can shut off its scheduling | |
462 | * clock and enter dyntick-idle mode. One way to accomplish this is | |
463 | * to drain all RCU callbacks from this CPU, and the other is to have | |
464 | * done everything RCU requires for the current grace period. In this | |
465 | * latter case, the CPU will be awakened at the end of the current grace | |
466 | * period in order to process the remainder of its callbacks. | |
467 | * | |
468 | * These tracepoints take a string as argument: | |
469 | * | |
470 | * "No callbacks": Nothing to do, no callbacks on this CPU. | |
471 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. | |
472 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. | |
473 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. | |
474 | * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. | |
475 | * "More callbacks": Still more callbacks, try again to clear them out. | |
476 | * "Callbacks drained": All callbacks processed, off to dyntick idle! | |
477 | * "Timer": Timer fired to cause CPU to continue processing callbacks. | |
478 | * "Demigrate": Timer fired on wrong CPU, woke up correct CPU. | |
479 | * "Cleanup after idle": Idle exited, timer canceled. | |
480 | */ | |
3bc29f0a | 481 | LTTNG_TRACEPOINT_EVENT(rcu_prep_idle, |
b87700e3 | 482 | |
01adf18e MD |
483 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
484 | TP_PROTO(const char *reason), | |
485 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ | |
b87700e3 | 486 | TP_PROTO(char *reason), |
01adf18e | 487 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ |
b87700e3 AG |
488 | |
489 | TP_ARGS(reason), | |
490 | ||
f127e61e MD |
491 | TP_FIELDS( |
492 | ctf_string(reason, reason) | |
493 | ) | |
b87700e3 AG |
494 | ) |
495 | #endif | |
496 | ||
497 | /* | |
498 | * Tracepoint for the registration of a single RCU callback function. | |
499 | * The first argument is the type of RCU, the second argument is | |
500 | * a pointer to the RCU callback itself, the third element is the | |
501 | * number of lazy callbacks queued, and the fourth element is the | |
502 | * total number of callbacks queued. | |
503 | */ | |
9f48a814 MJ |
504 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) |
505 | LTTNG_TRACEPOINT_EVENT(rcu_callback, | |
506 | ||
507 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen), | |
508 | ||
509 | TP_ARGS(rcuname, rhp, qlen), | |
510 | ||
511 | TP_FIELDS( | |
512 | ctf_string(rcuname, rcuname) | |
513 | ctf_integer_hex(void *, rhp, rhp) | |
514 | ctf_integer_hex(void *, func, rhp->func) | |
515 | ctf_integer(long, qlen, qlen) | |
516 | ) | |
517 | ) | |
518 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 519 | LTTNG_TRACEPOINT_EVENT(rcu_callback, |
b87700e3 | 520 | |
01adf18e MD |
521 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy, |
522 | long qlen), | |
523 | ||
524 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), | |
9f48a814 MJ |
525 | |
526 | TP_FIELDS( | |
527 | ctf_string(rcuname, rcuname) | |
528 | ctf_integer_hex(void *, rhp, rhp) | |
529 | ctf_integer_hex(void *, func, rhp->func) | |
530 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
531 | ctf_integer(long, qlen, qlen) | |
532 | ) | |
533 | ) | |
01adf18e | 534 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) |
9f48a814 MJ |
535 | LTTNG_TRACEPOINT_EVENT(rcu_callback, |
536 | ||
b87700e3 AG |
537 | TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, |
538 | long qlen), | |
539 | ||
540 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), | |
9f48a814 MJ |
541 | |
542 | TP_FIELDS( | |
543 | ctf_string(rcuname, rcuname) | |
544 | ctf_integer_hex(void *, rhp, rhp) | |
545 | ctf_integer_hex(void *, func, rhp->func) | |
546 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
547 | ctf_integer(long, qlen, qlen) | |
548 | ) | |
549 | ) | |
b87700e3 | 550 | #else |
9f48a814 MJ |
551 | LTTNG_TRACEPOINT_EVENT(rcu_callback, |
552 | ||
b87700e3 AG |
553 | TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen), |
554 | ||
555 | TP_ARGS(rcuname, rhp, qlen), | |
b87700e3 | 556 | |
f127e61e MD |
557 | TP_FIELDS( |
558 | ctf_string(rcuname, rcuname) | |
fa91fcac MD |
559 | ctf_integer_hex(void *, rhp, rhp) |
560 | ctf_integer_hex(void *, func, rhp->func) | |
f127e61e MD |
561 | ctf_integer(long, qlen, qlen) |
562 | ) | |
b87700e3 | 563 | ) |
9f48a814 MJ |
564 | #endif |
565 | ||
b87700e3 AG |
566 | |
567 | /* | |
568 | * Tracepoint for the registration of a single RCU callback of the special | |
569 | * kfree() form. The first argument is the RCU type, the second argument | |
570 | * is a pointer to the RCU callback, the third argument is the offset | |
571 | * of the callback within the enclosing RCU-protected data structure, | |
572 | * the fourth argument is the number of lazy callbacks queued, and the | |
573 | * fifth argument is the total number of callbacks queued. | |
574 | */ | |
9f48a814 | 575 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) |
3bc29f0a | 576 | LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, |
b87700e3 | 577 | |
9f48a814 MJ |
578 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, |
579 | long qlen), | |
580 | ||
581 | TP_ARGS(rcuname, rhp, offset, qlen), | |
582 | ||
583 | TP_FIELDS( | |
584 | ctf_string(rcuname, rcuname) | |
585 | ctf_integer_hex(void *, rhp, rhp) | |
586 | ctf_integer_hex(unsigned long, offset, offset) | |
587 | ctf_integer(long, qlen, qlen) | |
588 | ) | |
589 | ) | |
590 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
591 | LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, | |
01adf18e | 592 | |
01adf18e MD |
593 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, |
594 | long qlen_lazy, long qlen), | |
595 | ||
596 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), | |
9f48a814 MJ |
597 | |
598 | TP_FIELDS( | |
599 | ctf_string(rcuname, rcuname) | |
600 | ctf_integer_hex(void *, rhp, rhp) | |
601 | ctf_integer_hex(unsigned long, offset, offset) | |
602 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
603 | ctf_integer(long, qlen, qlen) | |
604 | ) | |
605 | ) | |
01adf18e | 606 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) |
9f48a814 MJ |
607 | LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, |
608 | ||
b87700e3 AG |
609 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, |
610 | long qlen_lazy, long qlen), | |
611 | ||
612 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), | |
9f48a814 MJ |
613 | |
614 | TP_FIELDS( | |
615 | ctf_string(rcuname, rcuname) | |
616 | ctf_integer_hex(void *, rhp, rhp) | |
617 | ctf_integer_hex(unsigned long, offset, offset) | |
618 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
619 | ctf_integer(long, qlen, qlen) | |
620 | ) | |
621 | ) | |
b87700e3 | 622 | #else |
9f48a814 MJ |
623 | LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback, |
624 | ||
b87700e3 AG |
625 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, |
626 | long qlen), | |
627 | ||
628 | TP_ARGS(rcuname, rhp, offset, qlen), | |
b87700e3 | 629 | |
f127e61e MD |
630 | TP_FIELDS( |
631 | ctf_string(rcuname, rcuname) | |
fa91fcac MD |
632 | ctf_integer_hex(void *, rhp, rhp) |
633 | ctf_integer_hex(unsigned long, offset, offset) | |
f127e61e MD |
634 | ctf_integer(long, qlen, qlen) |
635 | ) | |
b87700e3 | 636 | ) |
9f48a814 | 637 | #endif |
b87700e3 AG |
638 | |
639 | /* | |
640 | * Tracepoint for marking the beginning rcu_do_batch, performed to start | |
641 | * RCU callback invocation. The first argument is the RCU flavor, | |
642 | * the second is the number of lazy callbacks queued, the third is | |
643 | * the total number of callbacks queued, and the fourth argument is | |
644 | * the current RCU-callback batch limit. | |
645 | */ | |
9f48a814 MJ |
646 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) |
647 | LTTNG_TRACEPOINT_EVENT(rcu_batch_start, | |
648 | ||
649 | TP_PROTO(const char *rcuname, long qlen, long blimit), | |
650 | ||
651 | TP_ARGS(rcuname, qlen, blimit), | |
652 | ||
653 | TP_FIELDS( | |
654 | ctf_string(rcuname, rcuname) | |
655 | ctf_integer(long, qlen, qlen) | |
656 | ctf_integer(long, blimit, blimit) | |
657 | ) | |
658 | ) | |
659 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
3bc29f0a | 660 | LTTNG_TRACEPOINT_EVENT(rcu_batch_start, |
b87700e3 | 661 | |
01adf18e MD |
662 | TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit), |
663 | ||
664 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), | |
9f48a814 MJ |
665 | |
666 | TP_FIELDS( | |
667 | ctf_string(rcuname, rcuname) | |
668 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
669 | ctf_integer(long, qlen, qlen) | |
670 | ctf_integer(long, blimit, blimit) | |
671 | ) | |
672 | ) | |
01adf18e | 673 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) |
9f48a814 MJ |
674 | LTTNG_TRACEPOINT_EVENT(rcu_batch_start, |
675 | ||
4b4111c9 MD |
676 | TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit), |
677 | ||
678 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), | |
9f48a814 MJ |
679 | |
680 | TP_FIELDS( | |
681 | ctf_string(rcuname, rcuname) | |
682 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
683 | ctf_integer(long, qlen, qlen) | |
684 | ctf_integer(long, blimit, blimit) | |
685 | ) | |
686 | ) | |
4b4111c9 | 687 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) |
9f48a814 MJ |
688 | LTTNG_TRACEPOINT_EVENT(rcu_batch_start, |
689 | ||
b87700e3 AG |
690 | TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit), |
691 | ||
692 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), | |
9f48a814 MJ |
693 | |
694 | TP_FIELDS( | |
695 | ctf_string(rcuname, rcuname) | |
696 | ctf_integer(long, qlen_lazy, qlen_lazy) | |
697 | ctf_integer(long, qlen, qlen) | |
698 | ctf_integer(int, blimit, blimit) | |
699 | ) | |
700 | ) | |
b87700e3 | 701 | #else |
9f48a814 MJ |
702 | LTTNG_TRACEPOINT_EVENT(rcu_batch_start, |
703 | ||
b87700e3 AG |
704 | TP_PROTO(char *rcuname, long qlen, int blimit), |
705 | ||
706 | TP_ARGS(rcuname, qlen, blimit), | |
b87700e3 | 707 | |
f127e61e MD |
708 | TP_FIELDS( |
709 | ctf_string(rcuname, rcuname) | |
f127e61e | 710 | ctf_integer(long, qlen, qlen) |
f127e61e | 711 | ctf_integer(int, blimit, blimit) |
f127e61e | 712 | ) |
b87700e3 | 713 | ) |
9f48a814 | 714 | #endif |
b87700e3 AG |
715 | |
716 | /* | |
717 | * Tracepoint for the invocation of a single RCU callback function. | |
718 | * The first argument is the type of RCU, and the second argument is | |
719 | * a pointer to the RCU callback itself. | |
720 | */ | |
3bc29f0a | 721 | LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback, |
b87700e3 | 722 | |
01adf18e MD |
723 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
724 | TP_PROTO(const char *rcuname, struct rcu_head *rhp), | |
725 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ | |
b87700e3 | 726 | TP_PROTO(char *rcuname, struct rcu_head *rhp), |
01adf18e | 727 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ |
b87700e3 AG |
728 | |
729 | TP_ARGS(rcuname, rhp), | |
730 | ||
f127e61e MD |
731 | TP_FIELDS( |
732 | ctf_string(rcuname, rcuname) | |
fa91fcac MD |
733 | ctf_integer_hex(void *, rhp, rhp) |
734 | ctf_integer_hex(void *, func, rhp->func) | |
f127e61e | 735 | ) |
b87700e3 AG |
736 | ) |
737 | ||
738 | /* | |
739 | * Tracepoint for the invocation of a single RCU callback of the special | |
740 | * kfree() form. The first argument is the RCU flavor, the second | |
741 | * argument is a pointer to the RCU callback, and the third argument | |
742 | * is the offset of the callback within the enclosing RCU-protected | |
743 | * data structure. | |
744 | */ | |
3bc29f0a | 745 | LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback, |
b87700e3 | 746 | |
01adf18e MD |
747 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
748 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset), | |
749 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ | |
b87700e3 | 750 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), |
01adf18e | 751 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ |
b87700e3 AG |
752 | |
753 | TP_ARGS(rcuname, rhp, offset), | |
754 | ||
f127e61e MD |
755 | TP_FIELDS( |
756 | ctf_string(rcuname, rcuname) | |
fa91fcac | 757 | ctf_integer_hex(void *, rhp, rhp) |
f127e61e MD |
758 | ctf_integer(unsigned long, offset, offset) |
759 | ) | |
b87700e3 AG |
760 | ) |
761 | ||
762 | /* | |
763 | * Tracepoint for exiting rcu_do_batch after RCU callbacks have been | |
764 | * invoked. The first argument is the name of the RCU flavor, | |
765 | * the second argument is number of callbacks actually invoked, | |
766 | * the third argument (cb) is whether or not any of the callbacks that | |
767 | * were ready to invoke at the beginning of this batch are still | |
768 | * queued, the fourth argument (nr) is the return value of need_resched(), | |
769 | * the fifth argument (iit) is 1 if the current task is the idle task, | |
770 | * and the sixth argument (risk) is the return value from | |
771 | * rcu_is_callbacks_kthread(). | |
772 | */ | |
3bc29f0a | 773 | LTTNG_TRACEPOINT_EVENT(rcu_batch_end, |
b87700e3 | 774 | |
01adf18e MD |
775 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) |
776 | TP_PROTO(const char *rcuname, int callbacks_invoked, | |
777 | char cb, char nr, char iit, char risk), | |
778 | ||
779 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | |
780 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
781 | TP_PROTO(const char *rcuname, int callbacks_invoked, | |
782 | bool cb, bool nr, bool iit, bool risk), | |
783 | ||
784 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | |
785 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
b87700e3 AG |
786 | TP_PROTO(char *rcuname, int callbacks_invoked, |
787 | bool cb, bool nr, bool iit, bool risk), | |
788 | ||
789 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | |
790 | #else | |
791 | TP_PROTO(char *rcuname, int callbacks_invoked), | |
792 | ||
793 | TP_ARGS(rcuname, callbacks_invoked), | |
794 | #endif | |
795 | ||
f127e61e MD |
796 | TP_FIELDS( |
797 | ctf_string(rcuname, rcuname) | |
798 | ctf_integer(int, callbacks_invoked, callbacks_invoked) | |
01adf18e | 799 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) |
f127e61e MD |
800 | ctf_integer(char, cb, cb) |
801 | ctf_integer(char, nr, nr) | |
802 | ctf_integer(char, iit, iit) | |
803 | ctf_integer(char, risk, risk) | |
01adf18e | 804 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) |
f127e61e MD |
805 | ctf_integer(bool, cb, cb) |
806 | ctf_integer(bool, nr, nr) | |
807 | ctf_integer(bool, iit, iit) | |
808 | ctf_integer(bool, risk, risk) | |
b87700e3 | 809 | #endif |
f127e61e | 810 | ) |
b87700e3 AG |
811 | ) |
812 | ||
813 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
814 | /* | |
815 | * Tracepoint for rcutorture readers. The first argument is the name | |
816 | * of the RCU flavor from rcutorture's viewpoint and the second argument | |
817 | * is the callback address. | |
818 | */ | |
3bc29f0a | 819 | LTTNG_TRACEPOINT_EVENT(rcu_torture_read, |
b87700e3 | 820 | |
01adf18e MD |
821 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
822 | TP_PROTO(const char *rcutorturename, struct rcu_head *rhp, | |
823 | unsigned long secs, unsigned long c_old, unsigned long c), | |
824 | ||
825 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), | |
826 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | |
a828b9d5 MD |
827 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp, |
828 | unsigned long secs, unsigned long c_old, unsigned long c), | |
829 | ||
830 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), | |
831 | #else | |
b87700e3 AG |
832 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp), |
833 | ||
834 | TP_ARGS(rcutorturename, rhp), | |
a828b9d5 | 835 | #endif |
b87700e3 | 836 | |
f127e61e MD |
837 | TP_FIELDS( |
838 | ctf_string(rcutorturename, rcutorturename) | |
fa91fcac | 839 | ctf_integer_hex(struct rcu_head *, rhp, rhp) |
a828b9d5 | 840 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) |
f127e61e MD |
841 | ctf_integer(unsigned long, secs, secs) |
842 | ctf_integer(unsigned long, c_old, c_old) | |
843 | ctf_integer(unsigned long, c, c) | |
a828b9d5 | 844 | #endif |
f127e61e | 845 | ) |
b87700e3 AG |
846 | ) |
847 | #endif | |
848 | ||
849 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) | |
850 | /* | |
851 | * Tracepoint for _rcu_barrier() execution. The string "s" describes | |
852 | * the _rcu_barrier phase: | |
853 | * "Begin": rcu_barrier_callback() started. | |
854 | * "Check": rcu_barrier_callback() checking for piggybacking. | |
855 | * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. | |
856 | * "Inc1": rcu_barrier_callback() piggyback check counter incremented. | |
857 | * "Offline": rcu_barrier_callback() found offline CPU | |
858 | * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. | |
859 | * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. | |
860 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. | |
861 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. | |
862 | * "LastCB": An rcu_barrier_callback() invoked the last callback. | |
863 | * "Inc2": rcu_barrier_callback() piggyback check counter incremented. | |
864 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument | |
865 | * is the count of remaining callbacks, and "done" is the piggybacking count. | |
866 | */ | |
3bc29f0a | 867 | LTTNG_TRACEPOINT_EVENT(rcu_barrier, |
b87700e3 | 868 | |
01adf18e MD |
869 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
870 | TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done), | |
871 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ | |
b87700e3 | 872 | TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), |
01adf18e | 873 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ |
b87700e3 AG |
874 | |
875 | TP_ARGS(rcuname, s, cpu, cnt, done), | |
876 | ||
f127e61e MD |
877 | TP_FIELDS( |
878 | ctf_string(rcuname, rcuname) | |
879 | ctf_string(s, s) | |
880 | ctf_integer(int, cpu, cpu) | |
881 | ctf_integer(int, cnt, cnt) | |
882 | ctf_integer(unsigned long, done, done) | |
883 | ) | |
b87700e3 AG |
884 | ) |
885 | #endif | |
886 | ||
887 | #else /* #ifdef CONFIG_RCU_TRACE */ | |
888 | ||
ae8ff4cd MJ |
889 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) |
890 | #define trace_rcu_grace_period(rcuname, gp_seq, gpevent) do { } while (0) | |
891 | #define trace_rcu_grace_period_init(rcuname, gp_seq, level, grplo, grphi, \ | |
892 | qsmask) do { } while (0) | |
893 | #define trace_rcu_preempt_task(rcuname, pid, gp_seq) do { } while (0) | |
894 | #define trace_rcu_unlock_preempted_task(rcuname, gp_seq, pid) do { } while (0) | |
895 | #define trace_rcu_quiescent_state_report(rcuname, gp_seq, mask, qsmask, level, \ | |
896 | grplo, grphi, gp_tasks) do { } \ | |
897 | while (0) | |
898 | #define trace_rcu_fqs(rcuname, gp_seq, cpu, qsevent) do { } while (0) | |
899 | #else | |
b87700e3 AG |
900 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) |
901 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ | |
902 | qsmask) do { } while (0) | |
903 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) | |
904 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | |
905 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ | |
906 | grplo, grphi, gp_tasks) do { } \ | |
907 | while (0) | |
908 | #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) | |
ae8ff4cd MJ |
909 | #endif |
910 | ||
e706ff36 | 911 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) |
b575c4a3 MD |
912 | #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0) |
913 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
b87700e3 AG |
914 | #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) |
915 | #else | |
916 | #define trace_rcu_dyntick(polarity) do { } while (0) | |
917 | #endif | |
918 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
919 | #define trace_rcu_prep_idle(reason) do { } while (0) | |
920 | #endif | |
921 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) | |
922 | #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0) | |
923 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \ | |
924 | do { } while (0) | |
925 | #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \ | |
926 | do { } while (0) | |
927 | #else | |
928 | #define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0) | |
929 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0) | |
930 | #define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) | |
931 | #endif | |
932 | #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) | |
933 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) | |
934 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
935 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ | |
936 | do { } while (0) | |
937 | #else | |
938 | #define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0) | |
939 | #endif | |
a828b9d5 MD |
940 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) |
941 | #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ | |
942 | do { } while (0) | |
943 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
b87700e3 AG |
944 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) |
945 | #endif | |
946 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) | |
947 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) | |
948 | #endif | |
949 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ | |
950 | ||
3bc29f0a | 951 | #endif /* LTTNG_TRACE_RCU_H */ |
b87700e3 AG |
952 | |
953 | /* This part must be outside protection */ | |
6ec43db8 | 954 | #include <probes/define_trace.h> |