2 #define TRACE_SYSTEM rcu
4 #if !defined(LTTNG_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_RCU_H
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/version.h>
11 * Tracepoint for start/end markers used for utilization calculations.
12 * By convention, the string is of the following forms:
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.
18 * An "@" character within "<activity>" is a comment character: Data
19 * reduction scripts will ignore the "@" and the remainder of the line.
21 LTTNG_TRACEPOINT_EVENT(rcu_utilization
,
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)) */
27 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
36 #ifdef CONFIG_RCU_TRACE
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)
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").
52 LTTNG_TRACEPOINT_EVENT(rcu_grace_period
,
54 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
55 TP_PROTO(const char *rcuname
, unsigned long gpnum
, const char *gpevent
),
56 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
57 TP_PROTO(char *rcuname
, unsigned long gpnum
, char *gpevent
),
58 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
60 TP_ARGS(rcuname
, gpnum
, gpevent
),
63 ctf_string(rcuname
, rcuname
)
64 ctf_integer(unsigned long, gpnum
, gpnum
)
65 ctf_string(gpevent
, gpevent
)
70 * Tracepoint for grace-period-initialization events. These are
71 * distinguished by the type of RCU, the new grace-period number, the
72 * rcu_node structure level, the starting and ending CPU covered by the
73 * rcu_node structure, and the mask of CPUs that will be waited for.
74 * All but the type of RCU are extracted from the rcu_node structure.
76 LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init
,
78 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
79 TP_PROTO(const char *rcuname
, unsigned long gpnum
, u8 level
,
80 int grplo
, int grphi
, unsigned long qsmask
),
81 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
82 TP_PROTO(char *rcuname
, unsigned long gpnum
, u8 level
,
83 int grplo
, int grphi
, unsigned long qsmask
),
84 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
86 TP_ARGS(rcuname
, gpnum
, level
, grplo
, grphi
, qsmask
),
89 ctf_string(rcuname
, rcuname
)
90 ctf_integer(unsigned long, gpnum
, gpnum
)
91 ctf_integer(u8
, level
, level
)
92 ctf_integer(int, grplo
, grplo
)
93 ctf_integer(int, grphi
, grphi
)
94 ctf_integer(unsigned long, qsmask
, qsmask
)
99 * Tracepoint for tasks blocking within preemptible-RCU read-side
100 * critical sections. Track the type of RCU (which one day might
101 * include SRCU), the grace-period number that the task is blocking
102 * (the current or the next), and the task's PID.
104 LTTNG_TRACEPOINT_EVENT(rcu_preempt_task
,
106 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
107 TP_PROTO(const char *rcuname
, int pid
, unsigned long gpnum
),
108 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
109 TP_PROTO(char *rcuname
, int pid
, unsigned long gpnum
),
110 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
112 TP_ARGS(rcuname
, pid
, gpnum
),
115 ctf_string(rcuname
, rcuname
)
116 ctf_integer(unsigned long, gpnum
, gpnum
)
117 ctf_integer(int, pid
, pid
)
122 * Tracepoint for tasks that blocked within a given preemptible-RCU
123 * read-side critical section exiting that critical section. Track the
124 * type of RCU (which one day might include SRCU) and the task's PID.
126 LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task
,
128 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
129 TP_PROTO(const char *rcuname
, unsigned long gpnum
, int pid
),
130 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
131 TP_PROTO(char *rcuname
, unsigned long gpnum
, int pid
),
132 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
134 TP_ARGS(rcuname
, gpnum
, pid
),
137 ctf_string(rcuname
, rcuname
)
138 ctf_integer(unsigned long, gpnum
, gpnum
)
139 ctf_integer(int, pid
, pid
)
144 * Tracepoint for quiescent-state-reporting events. These are
145 * distinguished by the type of RCU, the grace-period number, the
146 * mask of quiescent lower-level entities, the rcu_node structure level,
147 * the starting and ending CPU covered by the rcu_node structure, and
148 * whether there are any blocked tasks blocking the current grace period.
149 * All but the type of RCU are extracted from the rcu_node structure.
151 LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report
,
153 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
154 TP_PROTO(const char *rcuname
, unsigned long gpnum
,
155 unsigned long mask
, unsigned long qsmask
,
156 u8 level
, int grplo
, int grphi
, int gp_tasks
),
157 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
158 TP_PROTO(char *rcuname
, unsigned long gpnum
,
159 unsigned long mask
, unsigned long qsmask
,
160 u8 level
, int grplo
, int grphi
, int gp_tasks
),
161 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
163 TP_ARGS(rcuname
, gpnum
, mask
, qsmask
, level
, grplo
, grphi
, gp_tasks
),
166 ctf_string(rcuname
, rcuname
)
167 ctf_integer(unsigned long, gpnum
, gpnum
)
168 ctf_integer(unsigned long, mask
, mask
)
169 ctf_integer(unsigned long, qsmask
, qsmask
)
170 ctf_integer(u8
, level
, level
)
171 ctf_integer(int, grplo
, grplo
)
172 ctf_integer(int, grphi
, grphi
)
173 ctf_integer(u8
, gp_tasks
, gp_tasks
)
178 * Tracepoint for quiescent states detected by force_quiescent_state().
179 * These trace events include the type of RCU, the grace-period number
180 * that was blocked by the CPU, the CPU itself, and the type of quiescent
181 * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline,
182 * or "kick" when kicking a CPU that has been in dyntick-idle mode for
185 LTTNG_TRACEPOINT_EVENT(rcu_fqs
,
187 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
188 TP_PROTO(const char *rcuname
, unsigned long gpnum
, int cpu
, const char *qsevent
),
189 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
190 TP_PROTO(char *rcuname
, unsigned long gpnum
, int cpu
, char *qsevent
),
191 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
193 TP_ARGS(rcuname
, gpnum
, cpu
, qsevent
),
196 ctf_integer(unsigned long, gpnum
, gpnum
)
197 ctf_integer(int, cpu
, cpu
)
198 ctf_string(rcuname
, rcuname
)
199 ctf_string(qsevent
, qsevent
)
204 * #if defined(CONFIG_TREE_RCU)
205 * || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
206 * && defined(CONFIG_PREEMPT_RCU))
207 * || defined(CONFIG_TREE_PREEMPT_RCU)
211 * Tracepoint for dyntick-idle entry/exit events. These take a string
212 * as argument: "Start" for entering dyntick-idle mode, "End" for
213 * leaving it, "--=" for events moving towards idle, and "++=" for events
214 * moving away from idle. "Error on entry: not idle task" and "Error on
215 * exit: not idle task" indicate that a non-idle task is erroneously
216 * toying with the idle loop.
218 * These events also take a pair of numbers, which indicate the nesting
219 * depth before and after the event of interest. Note that task-related
220 * events use the upper bits of each number, while interrupt-related
221 * events use the lower bits.
223 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
224 LTTNG_TRACEPOINT_EVENT(rcu_dyntick
,
226 TP_PROTO(const char *polarity
, long oldnesting
, long newnesting
, atomic_t dynticks
),
228 TP_ARGS(polarity
, oldnesting
, newnesting
, dynticks
),
231 ctf_string(polarity
, polarity
)
232 ctf_integer(long, oldnesting
, oldnesting
)
233 ctf_integer(long, newnesting
, newnesting
)
234 ctf_integer(int, dynticks
, atomic_read(&dynticks
))
238 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
239 LTTNG_TRACEPOINT_EVENT(rcu_dyntick
,
241 TP_PROTO(const char *polarity
, long long oldnesting
, long long newnesting
),
243 TP_ARGS(polarity
, oldnesting
, newnesting
),
246 ctf_string(polarity
, polarity
)
247 ctf_integer(long long, oldnesting
, oldnesting
)
248 ctf_integer(long long, newnesting
, newnesting
)
251 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
252 LTTNG_TRACEPOINT_EVENT(rcu_dyntick
,
254 TP_PROTO(char *polarity
, long long oldnesting
, long long newnesting
),
256 TP_ARGS(polarity
, oldnesting
, newnesting
),
259 ctf_string(polarity
, polarity
)
260 ctf_integer(long long, oldnesting
, oldnesting
)
261 ctf_integer(long long, newnesting
, newnesting
)
265 LTTNG_TRACEPOINT_EVENT(rcu_dyntick
,
267 TP_PROTO(char *polarity
),
272 ctf_string(polarity
, polarity
)
278 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
280 * Tracepoint for RCU preparation for idle, the goal being to get RCU
281 * processing done so that the current CPU can shut off its scheduling
282 * clock and enter dyntick-idle mode. One way to accomplish this is
283 * to drain all RCU callbacks from this CPU, and the other is to have
284 * done everything RCU requires for the current grace period. In this
285 * latter case, the CPU will be awakened at the end of the current grace
286 * period in order to process the remainder of its callbacks.
288 * These tracepoints take a string as argument:
290 * "No callbacks": Nothing to do, no callbacks on this CPU.
291 * "In holdoff": Nothing to do, holding off after unsuccessful attempt.
292 * "Begin holdoff": Attempt failed, don't retry until next jiffy.
293 * "Dyntick with callbacks": Entering dyntick-idle despite callbacks.
294 * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks.
295 * "More callbacks": Still more callbacks, try again to clear them out.
296 * "Callbacks drained": All callbacks processed, off to dyntick idle!
297 * "Timer": Timer fired to cause CPU to continue processing callbacks.
298 * "Demigrate": Timer fired on wrong CPU, woke up correct CPU.
299 * "Cleanup after idle": Idle exited, timer canceled.
301 LTTNG_TRACEPOINT_EVENT(rcu_prep_idle
,
303 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
304 TP_PROTO(const char *reason
),
305 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
306 TP_PROTO(char *reason
),
307 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
312 ctf_string(reason
, reason
)
318 * Tracepoint for the registration of a single RCU callback function.
319 * The first argument is the type of RCU, the second argument is
320 * a pointer to the RCU callback itself, the third element is the
321 * number of lazy callbacks queued, and the fourth element is the
322 * total number of callbacks queued.
324 LTTNG_TRACEPOINT_EVENT(rcu_callback
,
326 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
327 TP_PROTO(const char *rcuname
, struct rcu_head
*rhp
, long qlen_lazy
,
330 TP_ARGS(rcuname
, rhp
, qlen_lazy
, qlen
),
331 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
332 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
, long qlen_lazy
,
335 TP_ARGS(rcuname
, rhp
, qlen_lazy
, qlen
),
337 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
, long qlen
),
339 TP_ARGS(rcuname
, rhp
, qlen
),
343 ctf_string(rcuname
, rcuname
)
344 ctf_integer_hex(void *, rhp
, rhp
)
345 ctf_integer_hex(void *, func
, rhp
->func
)
346 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
347 ctf_integer(long, qlen_lazy
, qlen_lazy
)
349 ctf_integer(long, qlen
, qlen
)
354 * Tracepoint for the registration of a single RCU callback of the special
355 * kfree() form. The first argument is the RCU type, the second argument
356 * is a pointer to the RCU callback, the third argument is the offset
357 * of the callback within the enclosing RCU-protected data structure,
358 * the fourth argument is the number of lazy callbacks queued, and the
359 * fifth argument is the total number of callbacks queued.
361 LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback
,
364 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
365 TP_PROTO(const char *rcuname
, struct rcu_head
*rhp
, unsigned long offset
,
366 long qlen_lazy
, long qlen
),
368 TP_ARGS(rcuname
, rhp
, offset
, qlen_lazy
, qlen
),
369 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
370 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
, unsigned long offset
,
371 long qlen_lazy
, long qlen
),
373 TP_ARGS(rcuname
, rhp
, offset
, qlen_lazy
, qlen
),
375 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
, unsigned long offset
,
378 TP_ARGS(rcuname
, rhp
, offset
, qlen
),
382 ctf_string(rcuname
, rcuname
)
383 ctf_integer_hex(void *, rhp
, rhp
)
384 ctf_integer_hex(unsigned long, offset
, offset
)
385 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
386 ctf_integer(long, qlen_lazy
, qlen_lazy
)
388 ctf_integer(long, qlen
, qlen
)
393 * Tracepoint for marking the beginning rcu_do_batch, performed to start
394 * RCU callback invocation. The first argument is the RCU flavor,
395 * the second is the number of lazy callbacks queued, the third is
396 * the total number of callbacks queued, and the fourth argument is
397 * the current RCU-callback batch limit.
399 LTTNG_TRACEPOINT_EVENT(rcu_batch_start
,
401 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
402 TP_PROTO(const char *rcuname
, long qlen_lazy
, long qlen
, long blimit
),
404 TP_ARGS(rcuname
, qlen_lazy
, qlen
, blimit
),
405 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
406 TP_PROTO(char *rcuname
, long qlen_lazy
, long qlen
, long blimit
),
408 TP_ARGS(rcuname
, qlen_lazy
, qlen
, blimit
),
409 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
410 TP_PROTO(char *rcuname
, long qlen_lazy
, long qlen
, int blimit
),
412 TP_ARGS(rcuname
, qlen_lazy
, qlen
, blimit
),
414 TP_PROTO(char *rcuname
, long qlen
, int blimit
),
416 TP_ARGS(rcuname
, qlen
, blimit
),
420 ctf_string(rcuname
, rcuname
)
421 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
422 ctf_integer(long, qlen_lazy
, qlen_lazy
)
424 ctf_integer(long, qlen
, qlen
)
425 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
426 ctf_integer(long, blimit
, blimit
)
428 ctf_integer(int, blimit
, blimit
)
434 * Tracepoint for the invocation of a single RCU callback function.
435 * The first argument is the type of RCU, and the second argument is
436 * a pointer to the RCU callback itself.
438 LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback
,
440 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
441 TP_PROTO(const char *rcuname
, struct rcu_head
*rhp
),
442 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
443 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
),
444 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
446 TP_ARGS(rcuname
, rhp
),
449 ctf_string(rcuname
, rcuname
)
450 ctf_integer_hex(void *, rhp
, rhp
)
451 ctf_integer_hex(void *, func
, rhp
->func
)
456 * Tracepoint for the invocation of a single RCU callback of the special
457 * kfree() form. The first argument is the RCU flavor, the second
458 * argument is a pointer to the RCU callback, and the third argument
459 * is the offset of the callback within the enclosing RCU-protected
462 LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback
,
464 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
465 TP_PROTO(const char *rcuname
, struct rcu_head
*rhp
, unsigned long offset
),
466 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
467 TP_PROTO(char *rcuname
, struct rcu_head
*rhp
, unsigned long offset
),
468 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
470 TP_ARGS(rcuname
, rhp
, offset
),
473 ctf_string(rcuname
, rcuname
)
474 ctf_integer_hex(void *, rhp
, rhp
)
475 ctf_integer(unsigned long, offset
, offset
)
480 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
481 * invoked. The first argument is the name of the RCU flavor,
482 * the second argument is number of callbacks actually invoked,
483 * the third argument (cb) is whether or not any of the callbacks that
484 * were ready to invoke at the beginning of this batch are still
485 * queued, the fourth argument (nr) is the return value of need_resched(),
486 * the fifth argument (iit) is 1 if the current task is the idle task,
487 * and the sixth argument (risk) is the return value from
488 * rcu_is_callbacks_kthread().
490 LTTNG_TRACEPOINT_EVENT(rcu_batch_end
,
492 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
493 TP_PROTO(const char *rcuname
, int callbacks_invoked
,
494 char cb
, char nr
, char iit
, char risk
),
496 TP_ARGS(rcuname
, callbacks_invoked
, cb
, nr
, iit
, risk
),
497 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
498 TP_PROTO(const char *rcuname
, int callbacks_invoked
,
499 bool cb
, bool nr
, bool iit
, bool risk
),
501 TP_ARGS(rcuname
, callbacks_invoked
, cb
, nr
, iit
, risk
),
502 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
503 TP_PROTO(char *rcuname
, int callbacks_invoked
,
504 bool cb
, bool nr
, bool iit
, bool risk
),
506 TP_ARGS(rcuname
, callbacks_invoked
, cb
, nr
, iit
, risk
),
508 TP_PROTO(char *rcuname
, int callbacks_invoked
),
510 TP_ARGS(rcuname
, callbacks_invoked
),
514 ctf_string(rcuname
, rcuname
)
515 ctf_integer(int, callbacks_invoked
, callbacks_invoked
)
516 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
517 ctf_integer(char, cb
, cb
)
518 ctf_integer(char, nr
, nr
)
519 ctf_integer(char, iit
, iit
)
520 ctf_integer(char, risk
, risk
)
521 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
522 ctf_integer(bool, cb
, cb
)
523 ctf_integer(bool, nr
, nr
)
524 ctf_integer(bool, iit
, iit
)
525 ctf_integer(bool, risk
, risk
)
530 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
532 * Tracepoint for rcutorture readers. The first argument is the name
533 * of the RCU flavor from rcutorture's viewpoint and the second argument
534 * is the callback address.
536 LTTNG_TRACEPOINT_EVENT(rcu_torture_read
,
538 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
539 TP_PROTO(const char *rcutorturename
, struct rcu_head
*rhp
,
540 unsigned long secs
, unsigned long c_old
, unsigned long c
),
542 TP_ARGS(rcutorturename
, rhp
, secs
, c_old
, c
),
543 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
544 TP_PROTO(char *rcutorturename
, struct rcu_head
*rhp
,
545 unsigned long secs
, unsigned long c_old
, unsigned long c
),
547 TP_ARGS(rcutorturename
, rhp
, secs
, c_old
, c
),
549 TP_PROTO(char *rcutorturename
, struct rcu_head
*rhp
),
551 TP_ARGS(rcutorturename
, rhp
),
555 ctf_string(rcutorturename
, rcutorturename
)
556 ctf_integer_hex(struct rcu_head
*, rhp
, rhp
)
557 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
558 ctf_integer(unsigned long, secs
, secs
)
559 ctf_integer(unsigned long, c_old
, c_old
)
560 ctf_integer(unsigned long, c
, c
)
566 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
568 * Tracepoint for _rcu_barrier() execution. The string "s" describes
569 * the _rcu_barrier phase:
570 * "Begin": rcu_barrier_callback() started.
571 * "Check": rcu_barrier_callback() checking for piggybacking.
572 * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit.
573 * "Inc1": rcu_barrier_callback() piggyback check counter incremented.
574 * "Offline": rcu_barrier_callback() found offline CPU
575 * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks.
576 * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks.
577 * "IRQ": An rcu_barrier_callback() callback posted on remote CPU.
578 * "CB": An rcu_barrier_callback() invoked a callback, not the last.
579 * "LastCB": An rcu_barrier_callback() invoked the last callback.
580 * "Inc2": rcu_barrier_callback() piggyback check counter incremented.
581 * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument
582 * is the count of remaining callbacks, and "done" is the piggybacking count.
584 LTTNG_TRACEPOINT_EVENT(rcu_barrier
,
586 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
587 TP_PROTO(const char *rcuname
, const char *s
, int cpu
, int cnt
, unsigned long done
),
588 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
589 TP_PROTO(char *rcuname
, char *s
, int cpu
, int cnt
, unsigned long done
),
590 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
592 TP_ARGS(rcuname
, s
, cpu
, cnt
, done
),
595 ctf_string(rcuname
, rcuname
)
597 ctf_integer(int, cpu
, cpu
)
598 ctf_integer(int, cnt
, cnt
)
599 ctf_integer(unsigned long, done
, done
)
604 #else /* #ifdef CONFIG_RCU_TRACE */
606 #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
607 #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \
608 qsmask) do { } while (0)
609 #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0)
610 #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0)
611 #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \
612 grplo, grphi, gp_tasks) do { } \
614 #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
615 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
616 #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0)
617 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
618 #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0)
620 #define trace_rcu_dyntick(polarity) do { } while (0)
622 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
623 #define trace_rcu_prep_idle(reason) do { } while (0)
625 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
626 #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
627 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
629 #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \
632 #define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0)
633 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0)
634 #define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0)
636 #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
637 #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
638 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
639 #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \
642 #define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0)
644 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
645 #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
647 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
648 #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0)
650 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
651 #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0)
653 #endif /* #else #ifdef CONFIG_RCU_TRACE */
655 #endif /* LTTNG_TRACE_RCU_H */
657 /* This part must be outside protection */
658 #include <probes/define_trace.h>