xtensa: support DMA buffers in high memory
[cris-mirror.git] / include / trace / events / rcu.h
blob0b50fda80db0e04cfde37cea792523ac957b3284
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM rcu
5 #if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_RCU_H
8 #include <linux/tracepoint.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 TRACE_EVENT(rcu_utilization,
23 TP_PROTO(const char *s),
25 TP_ARGS(s),
27 TP_STRUCT__entry(
28 __field(const char *, s)
31 TP_fast_assign(
32 __entry->s = s;
35 TP_printk("%s", __entry->s)
38 #ifdef CONFIG_RCU_TRACE
40 #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
43 * Tracepoint for grace-period events. Takes a string identifying the
44 * RCU flavor, the grace-period number, and a string identifying the
45 * grace-period-related event as follows:
47 * "AccReadyCB": CPU acclerates new callbacks to RCU_NEXT_READY_TAIL.
48 * "AccWaitCB": CPU accelerates new callbacks to RCU_WAIT_TAIL.
49 * "newreq": Request a new grace period.
50 * "start": Start a grace period.
51 * "cpustart": CPU first notices a grace-period start.
52 * "cpuqs": CPU passes through a quiescent state.
53 * "cpuonl": CPU comes online.
54 * "cpuofl": CPU goes offline.
55 * "reqwait": GP kthread sleeps waiting for grace-period request.
56 * "reqwaitsig": GP kthread awakened by signal from reqwait state.
57 * "fqswait": GP kthread waiting until time to force quiescent states.
58 * "fqsstart": GP kthread starts forcing quiescent states.
59 * "fqsend": GP kthread done forcing quiescent states.
60 * "fqswaitsig": GP kthread awakened by signal from fqswait state.
61 * "end": End a grace period.
62 * "cpuend": CPU first notices a grace-period end.
64 TRACE_EVENT(rcu_grace_period,
66 TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent),
68 TP_ARGS(rcuname, gpnum, gpevent),
70 TP_STRUCT__entry(
71 __field(const char *, rcuname)
72 __field(unsigned long, gpnum)
73 __field(const char *, gpevent)
76 TP_fast_assign(
77 __entry->rcuname = rcuname;
78 __entry->gpnum = gpnum;
79 __entry->gpevent = gpevent;
82 TP_printk("%s %lu %s",
83 __entry->rcuname, __entry->gpnum, __entry->gpevent)
87 * Tracepoint for future grace-period events, including those for no-callbacks
88 * CPUs. The caller should pull the data from the rcu_node structure,
89 * other than rcuname, which comes from the rcu_state structure, and event,
90 * which is one of the following:
92 * "Startleaf": Request a nocb grace period based on leaf-node data.
93 * "Startedleaf": Leaf-node start proved sufficient.
94 * "Startedleafroot": Leaf-node start proved sufficient after checking root.
95 * "Startedroot": Requested a nocb grace period based on root-node data.
96 * "StartWait": Start waiting for the requested grace period.
97 * "ResumeWait": Resume waiting after signal.
98 * "EndWait": Complete wait.
99 * "Cleanup": Clean up rcu_node structure after previous GP.
100 * "CleanupMore": Clean up, and another no-CB GP is needed.
102 TRACE_EVENT(rcu_future_grace_period,
104 TP_PROTO(const char *rcuname, unsigned long gpnum, unsigned long completed,
105 unsigned long c, u8 level, int grplo, int grphi,
106 const char *gpevent),
108 TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent),
110 TP_STRUCT__entry(
111 __field(const char *, rcuname)
112 __field(unsigned long, gpnum)
113 __field(unsigned long, completed)
114 __field(unsigned long, c)
115 __field(u8, level)
116 __field(int, grplo)
117 __field(int, grphi)
118 __field(const char *, gpevent)
121 TP_fast_assign(
122 __entry->rcuname = rcuname;
123 __entry->gpnum = gpnum;
124 __entry->completed = completed;
125 __entry->c = c;
126 __entry->level = level;
127 __entry->grplo = grplo;
128 __entry->grphi = grphi;
129 __entry->gpevent = gpevent;
132 TP_printk("%s %lu %lu %lu %u %d %d %s",
133 __entry->rcuname, __entry->gpnum, __entry->completed,
134 __entry->c, __entry->level, __entry->grplo, __entry->grphi,
135 __entry->gpevent)
139 * Tracepoint for grace-period-initialization events. These are
140 * distinguished by the type of RCU, the new grace-period number, the
141 * rcu_node structure level, the starting and ending CPU covered by the
142 * rcu_node structure, and the mask of CPUs that will be waited for.
143 * All but the type of RCU are extracted from the rcu_node structure.
145 TRACE_EVENT(rcu_grace_period_init,
147 TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level,
148 int grplo, int grphi, unsigned long qsmask),
150 TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask),
152 TP_STRUCT__entry(
153 __field(const char *, rcuname)
154 __field(unsigned long, gpnum)
155 __field(u8, level)
156 __field(int, grplo)
157 __field(int, grphi)
158 __field(unsigned long, qsmask)
161 TP_fast_assign(
162 __entry->rcuname = rcuname;
163 __entry->gpnum = gpnum;
164 __entry->level = level;
165 __entry->grplo = grplo;
166 __entry->grphi = grphi;
167 __entry->qsmask = qsmask;
170 TP_printk("%s %lu %u %d %d %lx",
171 __entry->rcuname, __entry->gpnum, __entry->level,
172 __entry->grplo, __entry->grphi, __entry->qsmask)
176 * Tracepoint for expedited grace-period events. Takes a string identifying
177 * the RCU flavor, the expedited grace-period sequence number, and a string
178 * identifying the grace-period-related event as follows:
180 * "snap": Captured snapshot of expedited grace period sequence number.
181 * "start": Started a real expedited grace period.
182 * "end": Ended a real expedited grace period.
183 * "endwake": Woke piggybackers up.
184 * "done": Someone else did the expedited grace period for us.
186 TRACE_EVENT(rcu_exp_grace_period,
188 TP_PROTO(const char *rcuname, unsigned long gpseq, const char *gpevent),
190 TP_ARGS(rcuname, gpseq, gpevent),
192 TP_STRUCT__entry(
193 __field(const char *, rcuname)
194 __field(unsigned long, gpseq)
195 __field(const char *, gpevent)
198 TP_fast_assign(
199 __entry->rcuname = rcuname;
200 __entry->gpseq = gpseq;
201 __entry->gpevent = gpevent;
204 TP_printk("%s %lu %s",
205 __entry->rcuname, __entry->gpseq, __entry->gpevent)
209 * Tracepoint for expedited grace-period funnel-locking events. Takes a
210 * string identifying the RCU flavor, an integer identifying the rcu_node
211 * combining-tree level, another pair of integers identifying the lowest-
212 * and highest-numbered CPU associated with the current rcu_node structure,
213 * and a string. identifying the grace-period-related event as follows:
215 * "nxtlvl": Advance to next level of rcu_node funnel
216 * "wait": Wait for someone else to do expedited GP
218 TRACE_EVENT(rcu_exp_funnel_lock,
220 TP_PROTO(const char *rcuname, u8 level, int grplo, int grphi,
221 const char *gpevent),
223 TP_ARGS(rcuname, level, grplo, grphi, gpevent),
225 TP_STRUCT__entry(
226 __field(const char *, rcuname)
227 __field(u8, level)
228 __field(int, grplo)
229 __field(int, grphi)
230 __field(const char *, gpevent)
233 TP_fast_assign(
234 __entry->rcuname = rcuname;
235 __entry->level = level;
236 __entry->grplo = grplo;
237 __entry->grphi = grphi;
238 __entry->gpevent = gpevent;
241 TP_printk("%s %d %d %d %s",
242 __entry->rcuname, __entry->level, __entry->grplo,
243 __entry->grphi, __entry->gpevent)
246 #ifdef CONFIG_RCU_NOCB_CPU
248 * Tracepoint for RCU no-CBs CPU callback handoffs. This event is intended
249 * to assist debugging of these handoffs.
251 * The first argument is the name of the RCU flavor, and the second is
252 * the number of the offloaded CPU are extracted. The third and final
253 * argument is a string as follows:
255 * "WakeEmpty": Wake rcuo kthread, first CB to empty list.
256 * "WakeEmptyIsDeferred": Wake rcuo kthread later, first CB to empty list.
257 * "WakeOvf": Wake rcuo kthread, CB list is huge.
258 * "WakeOvfIsDeferred": Wake rcuo kthread later, CB list is huge.
259 * "WakeNot": Don't wake rcuo kthread.
260 * "WakeNotPoll": Don't wake rcuo kthread because it is polling.
261 * "DeferredWake": Carried out the "IsDeferred" wakeup.
262 * "Poll": Start of new polling cycle for rcu_nocb_poll.
263 * "Sleep": Sleep waiting for CBs for !rcu_nocb_poll.
264 * "WokeEmpty": rcuo kthread woke to find empty list.
265 * "WokeNonEmpty": rcuo kthread woke to find non-empty list.
266 * "WaitQueue": Enqueue partially done, timed wait for it to complete.
267 * "WokeQueue": Partial enqueue now complete.
269 TRACE_EVENT(rcu_nocb_wake,
271 TP_PROTO(const char *rcuname, int cpu, const char *reason),
273 TP_ARGS(rcuname, cpu, reason),
275 TP_STRUCT__entry(
276 __field(const char *, rcuname)
277 __field(int, cpu)
278 __field(const char *, reason)
281 TP_fast_assign(
282 __entry->rcuname = rcuname;
283 __entry->cpu = cpu;
284 __entry->reason = reason;
287 TP_printk("%s %d %s", __entry->rcuname, __entry->cpu, __entry->reason)
289 #endif
292 * Tracepoint for tasks blocking within preemptible-RCU read-side
293 * critical sections. Track the type of RCU (which one day might
294 * include SRCU), the grace-period number that the task is blocking
295 * (the current or the next), and the task's PID.
297 TRACE_EVENT(rcu_preempt_task,
299 TP_PROTO(const char *rcuname, int pid, unsigned long gpnum),
301 TP_ARGS(rcuname, pid, gpnum),
303 TP_STRUCT__entry(
304 __field(const char *, rcuname)
305 __field(unsigned long, gpnum)
306 __field(int, pid)
309 TP_fast_assign(
310 __entry->rcuname = rcuname;
311 __entry->gpnum = gpnum;
312 __entry->pid = pid;
315 TP_printk("%s %lu %d",
316 __entry->rcuname, __entry->gpnum, __entry->pid)
320 * Tracepoint for tasks that blocked within a given preemptible-RCU
321 * read-side critical section exiting that critical section. Track the
322 * type of RCU (which one day might include SRCU) and the task's PID.
324 TRACE_EVENT(rcu_unlock_preempted_task,
326 TP_PROTO(const char *rcuname, unsigned long gpnum, int pid),
328 TP_ARGS(rcuname, gpnum, pid),
330 TP_STRUCT__entry(
331 __field(const char *, rcuname)
332 __field(unsigned long, gpnum)
333 __field(int, pid)
336 TP_fast_assign(
337 __entry->rcuname = rcuname;
338 __entry->gpnum = gpnum;
339 __entry->pid = pid;
342 TP_printk("%s %lu %d", __entry->rcuname, __entry->gpnum, __entry->pid)
346 * Tracepoint for quiescent-state-reporting events. These are
347 * distinguished by the type of RCU, the grace-period number, the
348 * mask of quiescent lower-level entities, the rcu_node structure level,
349 * the starting and ending CPU covered by the rcu_node structure, and
350 * whether there are any blocked tasks blocking the current grace period.
351 * All but the type of RCU are extracted from the rcu_node structure.
353 TRACE_EVENT(rcu_quiescent_state_report,
355 TP_PROTO(const char *rcuname, unsigned long gpnum,
356 unsigned long mask, unsigned long qsmask,
357 u8 level, int grplo, int grphi, int gp_tasks),
359 TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks),
361 TP_STRUCT__entry(
362 __field(const char *, rcuname)
363 __field(unsigned long, gpnum)
364 __field(unsigned long, mask)
365 __field(unsigned long, qsmask)
366 __field(u8, level)
367 __field(int, grplo)
368 __field(int, grphi)
369 __field(u8, gp_tasks)
372 TP_fast_assign(
373 __entry->rcuname = rcuname;
374 __entry->gpnum = gpnum;
375 __entry->mask = mask;
376 __entry->qsmask = qsmask;
377 __entry->level = level;
378 __entry->grplo = grplo;
379 __entry->grphi = grphi;
380 __entry->gp_tasks = gp_tasks;
383 TP_printk("%s %lu %lx>%lx %u %d %d %u",
384 __entry->rcuname, __entry->gpnum,
385 __entry->mask, __entry->qsmask, __entry->level,
386 __entry->grplo, __entry->grphi, __entry->gp_tasks)
390 * Tracepoint for quiescent states detected by force_quiescent_state().
391 * These trace events include the type of RCU, the grace-period number that
392 * was blocked by the CPU, the CPU itself, and the type of quiescent state,
393 * which can be "dti" for dyntick-idle mode, "ofl" for CPU offline, "kick"
394 * when kicking a CPU that has been in dyntick-idle mode for too long, or
395 * "rqc" if the CPU got a quiescent state via its rcu_qs_ctr.
397 TRACE_EVENT(rcu_fqs,
399 TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent),
401 TP_ARGS(rcuname, gpnum, cpu, qsevent),
403 TP_STRUCT__entry(
404 __field(const char *, rcuname)
405 __field(unsigned long, gpnum)
406 __field(int, cpu)
407 __field(const char *, qsevent)
410 TP_fast_assign(
411 __entry->rcuname = rcuname;
412 __entry->gpnum = gpnum;
413 __entry->cpu = cpu;
414 __entry->qsevent = qsevent;
417 TP_printk("%s %lu %d %s",
418 __entry->rcuname, __entry->gpnum,
419 __entry->cpu, __entry->qsevent)
422 #endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) */
425 * Tracepoint for dyntick-idle entry/exit events. These take a string
426 * as argument: "Start" for entering dyntick-idle mode, "Startirq" for
427 * entering it from irq/NMI, "End" for leaving it, "Endirq" for leaving it
428 * to irq/NMI, "--=" for events moving towards idle, and "++=" for events
429 * moving away from idle.
431 * These events also take a pair of numbers, which indicate the nesting
432 * depth before and after the event of interest, and a third number that is
433 * the ->dynticks counter. Note that task-related and interrupt-related
434 * events use two separate counters, and that the "++=" and "--=" events
435 * for irq/NMI will change the counter by two, otherwise by one.
437 TRACE_EVENT(rcu_dyntick,
439 TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks),
441 TP_ARGS(polarity, oldnesting, newnesting, dynticks),
443 TP_STRUCT__entry(
444 __field(const char *, polarity)
445 __field(long, oldnesting)
446 __field(long, newnesting)
447 __field(int, dynticks)
450 TP_fast_assign(
451 __entry->polarity = polarity;
452 __entry->oldnesting = oldnesting;
453 __entry->newnesting = newnesting;
454 __entry->dynticks = atomic_read(&dynticks);
457 TP_printk("%s %lx %lx %#3x", __entry->polarity,
458 __entry->oldnesting, __entry->newnesting,
459 __entry->dynticks & 0xfff)
463 * Tracepoint for the registration of a single RCU callback function.
464 * The first argument is the type of RCU, the second argument is
465 * a pointer to the RCU callback itself, the third element is the
466 * number of lazy callbacks queued, and the fourth element is the
467 * total number of callbacks queued.
469 TRACE_EVENT(rcu_callback,
471 TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy,
472 long qlen),
474 TP_ARGS(rcuname, rhp, qlen_lazy, qlen),
476 TP_STRUCT__entry(
477 __field(const char *, rcuname)
478 __field(void *, rhp)
479 __field(void *, func)
480 __field(long, qlen_lazy)
481 __field(long, qlen)
484 TP_fast_assign(
485 __entry->rcuname = rcuname;
486 __entry->rhp = rhp;
487 __entry->func = rhp->func;
488 __entry->qlen_lazy = qlen_lazy;
489 __entry->qlen = qlen;
492 TP_printk("%s rhp=%p func=%pf %ld/%ld",
493 __entry->rcuname, __entry->rhp, __entry->func,
494 __entry->qlen_lazy, __entry->qlen)
498 * Tracepoint for the registration of a single RCU callback of the special
499 * kfree() form. The first argument is the RCU type, the second argument
500 * is a pointer to the RCU callback, the third argument is the offset
501 * of the callback within the enclosing RCU-protected data structure,
502 * the fourth argument is the number of lazy callbacks queued, and the
503 * fifth argument is the total number of callbacks queued.
505 TRACE_EVENT(rcu_kfree_callback,
507 TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset,
508 long qlen_lazy, long qlen),
510 TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen),
512 TP_STRUCT__entry(
513 __field(const char *, rcuname)
514 __field(void *, rhp)
515 __field(unsigned long, offset)
516 __field(long, qlen_lazy)
517 __field(long, qlen)
520 TP_fast_assign(
521 __entry->rcuname = rcuname;
522 __entry->rhp = rhp;
523 __entry->offset = offset;
524 __entry->qlen_lazy = qlen_lazy;
525 __entry->qlen = qlen;
528 TP_printk("%s rhp=%p func=%ld %ld/%ld",
529 __entry->rcuname, __entry->rhp, __entry->offset,
530 __entry->qlen_lazy, __entry->qlen)
534 * Tracepoint for marking the beginning rcu_do_batch, performed to start
535 * RCU callback invocation. The first argument is the RCU flavor,
536 * the second is the number of lazy callbacks queued, the third is
537 * the total number of callbacks queued, and the fourth argument is
538 * the current RCU-callback batch limit.
540 TRACE_EVENT(rcu_batch_start,
542 TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit),
544 TP_ARGS(rcuname, qlen_lazy, qlen, blimit),
546 TP_STRUCT__entry(
547 __field(const char *, rcuname)
548 __field(long, qlen_lazy)
549 __field(long, qlen)
550 __field(long, blimit)
553 TP_fast_assign(
554 __entry->rcuname = rcuname;
555 __entry->qlen_lazy = qlen_lazy;
556 __entry->qlen = qlen;
557 __entry->blimit = blimit;
560 TP_printk("%s CBs=%ld/%ld bl=%ld",
561 __entry->rcuname, __entry->qlen_lazy, __entry->qlen,
562 __entry->blimit)
566 * Tracepoint for the invocation of a single RCU callback function.
567 * The first argument is the type of RCU, and the second argument is
568 * a pointer to the RCU callback itself.
570 TRACE_EVENT(rcu_invoke_callback,
572 TP_PROTO(const char *rcuname, struct rcu_head *rhp),
574 TP_ARGS(rcuname, rhp),
576 TP_STRUCT__entry(
577 __field(const char *, rcuname)
578 __field(void *, rhp)
579 __field(void *, func)
582 TP_fast_assign(
583 __entry->rcuname = rcuname;
584 __entry->rhp = rhp;
585 __entry->func = rhp->func;
588 TP_printk("%s rhp=%p func=%pf",
589 __entry->rcuname, __entry->rhp, __entry->func)
593 * Tracepoint for the invocation of a single RCU callback of the special
594 * kfree() form. The first argument is the RCU flavor, the second
595 * argument is a pointer to the RCU callback, and the third argument
596 * is the offset of the callback within the enclosing RCU-protected
597 * data structure.
599 TRACE_EVENT(rcu_invoke_kfree_callback,
601 TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset),
603 TP_ARGS(rcuname, rhp, offset),
605 TP_STRUCT__entry(
606 __field(const char *, rcuname)
607 __field(void *, rhp)
608 __field(unsigned long, offset)
611 TP_fast_assign(
612 __entry->rcuname = rcuname;
613 __entry->rhp = rhp;
614 __entry->offset = offset;
617 TP_printk("%s rhp=%p func=%ld",
618 __entry->rcuname, __entry->rhp, __entry->offset)
622 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
623 * invoked. The first argument is the name of the RCU flavor,
624 * the second argument is number of callbacks actually invoked,
625 * the third argument (cb) is whether or not any of the callbacks that
626 * were ready to invoke at the beginning of this batch are still
627 * queued, the fourth argument (nr) is the return value of need_resched(),
628 * the fifth argument (iit) is 1 if the current task is the idle task,
629 * and the sixth argument (risk) is the return value from
630 * rcu_is_callbacks_kthread().
632 TRACE_EVENT(rcu_batch_end,
634 TP_PROTO(const char *rcuname, int callbacks_invoked,
635 char cb, char nr, char iit, char risk),
637 TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk),
639 TP_STRUCT__entry(
640 __field(const char *, rcuname)
641 __field(int, callbacks_invoked)
642 __field(char, cb)
643 __field(char, nr)
644 __field(char, iit)
645 __field(char, risk)
648 TP_fast_assign(
649 __entry->rcuname = rcuname;
650 __entry->callbacks_invoked = callbacks_invoked;
651 __entry->cb = cb;
652 __entry->nr = nr;
653 __entry->iit = iit;
654 __entry->risk = risk;
657 TP_printk("%s CBs-invoked=%d idle=%c%c%c%c",
658 __entry->rcuname, __entry->callbacks_invoked,
659 __entry->cb ? 'C' : '.',
660 __entry->nr ? 'S' : '.',
661 __entry->iit ? 'I' : '.',
662 __entry->risk ? 'R' : '.')
666 * Tracepoint for rcutorture readers. The first argument is the name
667 * of the RCU flavor from rcutorture's viewpoint and the second argument
668 * is the callback address. The third argument is the start time in
669 * seconds, and the last two arguments are the grace period numbers
670 * at the beginning and end of the read, respectively. Note that the
671 * callback address can be NULL.
673 #define RCUTORTURENAME_LEN 8
674 TRACE_EVENT(rcu_torture_read,
676 TP_PROTO(const char *rcutorturename, struct rcu_head *rhp,
677 unsigned long secs, unsigned long c_old, unsigned long c),
679 TP_ARGS(rcutorturename, rhp, secs, c_old, c),
681 TP_STRUCT__entry(
682 __field(char, rcutorturename[RCUTORTURENAME_LEN])
683 __field(struct rcu_head *, rhp)
684 __field(unsigned long, secs)
685 __field(unsigned long, c_old)
686 __field(unsigned long, c)
689 TP_fast_assign(
690 strncpy(__entry->rcutorturename, rcutorturename,
691 RCUTORTURENAME_LEN);
692 __entry->rcutorturename[RCUTORTURENAME_LEN - 1] = 0;
693 __entry->rhp = rhp;
694 __entry->secs = secs;
695 __entry->c_old = c_old;
696 __entry->c = c;
699 TP_printk("%s torture read %p %luus c: %lu %lu",
700 __entry->rcutorturename, __entry->rhp,
701 __entry->secs, __entry->c_old, __entry->c)
705 * Tracepoint for _rcu_barrier() execution. The string "s" describes
706 * the _rcu_barrier phase:
707 * "Begin": _rcu_barrier() started.
708 * "EarlyExit": _rcu_barrier() piggybacked, thus early exit.
709 * "Inc1": _rcu_barrier() piggyback check counter incremented.
710 * "OfflineNoCB": _rcu_barrier() found callback on never-online CPU
711 * "OnlineNoCB": _rcu_barrier() found online no-CBs CPU.
712 * "OnlineQ": _rcu_barrier() found online CPU with callbacks.
713 * "OnlineNQ": _rcu_barrier() found online CPU, no callbacks.
714 * "IRQ": An rcu_barrier_callback() callback posted on remote CPU.
715 * "IRQNQ": An rcu_barrier_callback() callback found no callbacks.
716 * "CB": An rcu_barrier_callback() invoked a callback, not the last.
717 * "LastCB": An rcu_barrier_callback() invoked the last callback.
718 * "Inc2": _rcu_barrier() piggyback check counter incremented.
719 * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument
720 * is the count of remaining callbacks, and "done" is the piggybacking count.
722 TRACE_EVENT(rcu_barrier,
724 TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done),
726 TP_ARGS(rcuname, s, cpu, cnt, done),
728 TP_STRUCT__entry(
729 __field(const char *, rcuname)
730 __field(const char *, s)
731 __field(int, cpu)
732 __field(int, cnt)
733 __field(unsigned long, done)
736 TP_fast_assign(
737 __entry->rcuname = rcuname;
738 __entry->s = s;
739 __entry->cpu = cpu;
740 __entry->cnt = cnt;
741 __entry->done = done;
744 TP_printk("%s %s cpu %d remaining %d # %lu",
745 __entry->rcuname, __entry->s, __entry->cpu, __entry->cnt,
746 __entry->done)
749 #else /* #ifdef CONFIG_RCU_TRACE */
751 #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
752 #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \
753 level, grplo, grphi, event) \
754 do { } while (0)
755 #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \
756 qsmask) do { } while (0)
757 #define trace_rcu_exp_grace_period(rcuname, gqseq, gpevent) \
758 do { } while (0)
759 #define trace_rcu_exp_funnel_lock(rcuname, level, grplo, grphi, gpevent) \
760 do { } while (0)
761 #define trace_rcu_nocb_wake(rcuname, cpu, reason) do { } while (0)
762 #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0)
763 #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0)
764 #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \
765 grplo, grphi, gp_tasks) do { } \
766 while (0)
767 #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
768 #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0)
769 #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
770 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
771 do { } while (0)
772 #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \
773 do { } while (0)
774 #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
775 #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
776 #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \
777 do { } while (0)
778 #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
779 do { } while (0)
780 #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0)
782 #endif /* #else #ifdef CONFIG_RCU_TRACE */
784 #endif /* _TRACE_RCU_H */
786 /* This part must be outside protection */
787 #include <trace/define_trace.h>