aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-10-02 10:44:32 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-12-11 13:31:26 -0500
commit91afaf300269aa99a4d646969b3258b74294ac4d (patch)
treeb4d7dd5f5c9933be7873b206624f7b55eb25d906 /include/trace
parenta8eecf2248a45bf69f0625b23c003ad2ccd765ee (diff)
rcu: Add failure tracing to rcutorture
Trace the rcutorture RCU accesses and dump the trace buffer when the first failure is detected. 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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index e5771804c507..172620a92b1a 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -437,6 +437,31 @@ TRACE_EVENT(rcu_batch_end,
437 __entry->rcuname, __entry->callbacks_invoked) 437 __entry->rcuname, __entry->callbacks_invoked)
438); 438);
439 439
440/*
441 * Tracepoint for rcutorture readers. The first argument is the name
442 * of the RCU flavor from rcutorture's viewpoint and the second argument
443 * is the callback address.
444 */
445TRACE_EVENT(rcu_torture_read,
446
447 TP_PROTO(char *rcutorturename, struct rcu_head *rhp),
448
449 TP_ARGS(rcutorturename, rhp),
450
451 TP_STRUCT__entry(
452 __field(char *, rcutorturename)
453 __field(struct rcu_head *, rhp)
454 ),
455
456 TP_fast_assign(
457 __entry->rcutorturename = rcutorturename;
458 __entry->rhp = rhp;
459 ),
460
461 TP_printk("%s torture read %p",
462 __entry->rcutorturename, __entry->rhp)
463);
464
440#else /* #ifdef CONFIG_RCU_TRACE */ 465#else /* #ifdef CONFIG_RCU_TRACE */
441 466
442#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) 467#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
@@ -452,6 +477,7 @@ TRACE_EVENT(rcu_batch_end,
452#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) 477#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
453#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) 478#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
454#define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0) 479#define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0)
480#define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0)
455 481
456#endif /* #else #ifdef CONFIG_RCU_TRACE */ 482#endif /* #else #ifdef CONFIG_RCU_TRACE */
457 483