diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-11-14 19:26:40 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-01-08 17:14:55 -0500 |
commit | 52494535103986dbbf689b44d8c2c7efe2132b16 (patch) | |
tree | 88dd5a9d064608e9711c36f05b3b4aab8e255a4f /include/trace/events/rcu.h | |
parent | dc975e94f322e60fa8fcc44dec1820fde4de174c (diff) |
rcu: Reduce rcutorture tracing
Currently, rcutorture traces every read-side access. This can be
problematic because even a two-minute rcutorture run on a two-CPU system
can generate 28,853,363 reads. Normally, only a failing read is of
interest, so this commit traces adjusts rcutorture's tracing to only
trace failing reads. The resulting event tracing records the time
and the ->completed value captured at the beginning of the RCU read-side
critical section, allowing correlation with other event-tracing messages.
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>
[ paulmck: Add fix to build problem located by Randy Dunlap based on
diagnosis by Steven Rostedt. ]
Diffstat (limited to 'include/trace/events/rcu.h')
-rw-r--r-- | include/trace/events/rcu.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index d4f559b1ec34..09af021c8e96 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -523,22 +523,30 @@ TRACE_EVENT(rcu_batch_end, | |||
523 | */ | 523 | */ |
524 | TRACE_EVENT(rcu_torture_read, | 524 | TRACE_EVENT(rcu_torture_read, |
525 | 525 | ||
526 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp), | 526 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp, |
527 | unsigned long secs, unsigned long c_old, unsigned long c), | ||
527 | 528 | ||
528 | TP_ARGS(rcutorturename, rhp), | 529 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), |
529 | 530 | ||
530 | TP_STRUCT__entry( | 531 | TP_STRUCT__entry( |
531 | __field(char *, rcutorturename) | 532 | __field(char *, rcutorturename) |
532 | __field(struct rcu_head *, rhp) | 533 | __field(struct rcu_head *, rhp) |
534 | __field(unsigned long, secs) | ||
535 | __field(unsigned long, c_old) | ||
536 | __field(unsigned long, c) | ||
533 | ), | 537 | ), |
534 | 538 | ||
535 | TP_fast_assign( | 539 | TP_fast_assign( |
536 | __entry->rcutorturename = rcutorturename; | 540 | __entry->rcutorturename = rcutorturename; |
537 | __entry->rhp = rhp; | 541 | __entry->rhp = rhp; |
542 | __entry->secs = secs; | ||
543 | __entry->c_old = c_old; | ||
544 | __entry->c = c; | ||
538 | ), | 545 | ), |
539 | 546 | ||
540 | TP_printk("%s torture read %p", | 547 | TP_printk("%s torture read %p %luus c: %lu %lu", |
541 | __entry->rcutorturename, __entry->rhp) | 548 | __entry->rcutorturename, __entry->rhp, |
549 | __entry->secs, __entry->c_old, __entry->c) | ||
542 | ); | 550 | ); |
543 | 551 | ||
544 | /* | 552 | /* |
@@ -608,7 +616,8 @@ TRACE_EVENT(rcu_barrier, | |||
608 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) | 616 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) |
609 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ | 617 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ |
610 | do { } while (0) | 618 | do { } while (0) |
611 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) | 619 | #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ |
620 | do { } while (0) | ||
612 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) | 621 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) |
613 | 622 | ||
614 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ | 623 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ |