diff options
| author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-05-23 21:47:05 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-07-02 15:33:23 -0400 |
| commit | a83eff0a82a7f3f14fea477fd41e6c082e7fc96a (patch) | |
| tree | 9fb65b061716c622962c42b8318f06fd0d2919cd /include/trace | |
| parent | cf3a9c4842b1e097dbe0854933c471d43dd24f69 (diff) | |
rcu: Add tracing for _rcu_barrier()
This commit adds event tracing for _rcu_barrier() execution. This
is defined only if RCU_TRACE=y.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/rcu.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index d274734b2aa4..5bde94d8585b 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
| @@ -541,6 +541,50 @@ TRACE_EVENT(rcu_torture_read, | |||
| 541 | __entry->rcutorturename, __entry->rhp) | 541 | __entry->rcutorturename, __entry->rhp) |
| 542 | ); | 542 | ); |
| 543 | 543 | ||
| 544 | /* | ||
| 545 | * Tracepoint for _rcu_barrier() execution. The string "s" describes | ||
| 546 | * the _rcu_barrier phase: | ||
| 547 | * "Begin": rcu_barrier_callback() started. | ||
| 548 | * "Check": rcu_barrier_callback() checking for piggybacking. | ||
| 549 | * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. | ||
| 550 | * "Inc1": rcu_barrier_callback() piggyback check counter incremented. | ||
| 551 | * "Offline": rcu_barrier_callback() found offline CPU | ||
| 552 | * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. | ||
| 553 | * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. | ||
| 554 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. | ||
| 555 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. | ||
| 556 | * "LastCB": An rcu_barrier_callback() invoked the last callback. | ||
| 557 | * "Inc2": rcu_barrier_callback() piggyback check counter incremented. | ||
| 558 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument | ||
| 559 | * is the count of remaining callbacks, and "done" is the piggybacking count. | ||
| 560 | */ | ||
| 561 | TRACE_EVENT(rcu_barrier, | ||
| 562 | |||
| 563 | TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), | ||
| 564 | |||
| 565 | TP_ARGS(rcuname, s, cpu, cnt, done), | ||
| 566 | |||
| 567 | TP_STRUCT__entry( | ||
| 568 | __field(char *, rcuname) | ||
| 569 | __field(char *, s) | ||
| 570 | __field(int, cpu) | ||
| 571 | __field(int, cnt) | ||
| 572 | __field(unsigned long, done) | ||
| 573 | ), | ||
| 574 | |||
| 575 | TP_fast_assign( | ||
| 576 | __entry->rcuname = rcuname; | ||
| 577 | __entry->s = s; | ||
| 578 | __entry->cpu = cpu; | ||
| 579 | __entry->cnt = cnt; | ||
| 580 | __entry->done = done; | ||
| 581 | ), | ||
| 582 | |||
| 583 | TP_printk("%s %s cpu %d remaining %d # %lu", | ||
| 584 | __entry->rcuname, __entry->s, __entry->cpu, __entry->cnt, | ||
| 585 | __entry->done) | ||
| 586 | ); | ||
| 587 | |||
| 544 | #else /* #ifdef CONFIG_RCU_TRACE */ | 588 | #else /* #ifdef CONFIG_RCU_TRACE */ |
| 545 | 589 | ||
| 546 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) | 590 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) |
| @@ -564,6 +608,7 @@ TRACE_EVENT(rcu_torture_read, | |||
| 564 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ | 608 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ |
| 565 | do { } while (0) | 609 | do { } while (0) |
| 566 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) | 610 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) |
| 611 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) | ||
| 567 | 612 | ||
| 568 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ | 613 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ |
| 569 | 614 | ||
