aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-06-17 18:53:19 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:38:12 -0400
commit29c00b4a1d9e277786120032aa8364631820d863 (patch)
tree23bf0c8cdb5268ef92ef9ed007639705e922b1b0 /include/trace
parent9d68197c05201d8edc70d58bd1d5dad05d8455e8 (diff)
rcu: Add event-tracing for RCU callback invocation
There was recently some controversy about the overhead of invoking RCU callbacks. Add TRACE_EVENT()s to obtain fine-grained timings for the start and stop of a batch of callbacks and also for each callback invoked. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/rcu.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
new file mode 100644
index 000000000000..db3f6e9e63e6
--- /dev/null
+++ b/include/trace/events/rcu.h
@@ -0,0 +1,98 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM rcu
3
4#if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_RCU_H
6
7#include <linux/tracepoint.h>
8
9/*
10 * Tracepoint for calling rcu_do_batch, performed to start callback invocation:
11 */
12TRACE_EVENT(rcu_batch_start,
13
14 TP_PROTO(long callbacks_ready, int blimit),
15
16 TP_ARGS(callbacks_ready, blimit),
17
18 TP_STRUCT__entry(
19 __field( long, callbacks_ready )
20 __field( int, blimit )
21 ),
22
23 TP_fast_assign(
24 __entry->callbacks_ready = callbacks_ready;
25 __entry->blimit = blimit;
26 ),
27
28 TP_printk("CBs=%ld bl=%d", __entry->callbacks_ready, __entry->blimit)
29);
30
31/*
32 * Tracepoint for the invocation of a single RCU callback
33 */
34TRACE_EVENT(rcu_invoke_callback,
35
36 TP_PROTO(struct rcu_head *rhp),
37
38 TP_ARGS(rhp),
39
40 TP_STRUCT__entry(
41 __field( void *, rhp )
42 __field( void *, func )
43 ),
44
45 TP_fast_assign(
46 __entry->rhp = rhp;
47 __entry->func = rhp->func;
48 ),
49
50 TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func)
51);
52
53/*
54 * Tracepoint for the invocation of a single RCU kfree callback
55 */
56TRACE_EVENT(rcu_invoke_kfree_callback,
57
58 TP_PROTO(struct rcu_head *rhp, unsigned long offset),
59
60 TP_ARGS(rhp, offset),
61
62 TP_STRUCT__entry(
63 __field(void *, rhp )
64 __field(unsigned long, offset )
65 ),
66
67 TP_fast_assign(
68 __entry->rhp = rhp;
69 __entry->offset = offset;
70 ),
71
72 TP_printk("rhp=%p func=%ld", __entry->rhp, __entry->offset)
73);
74
75/*
76 * Tracepoint for leaving rcu_do_batch, performed after callback invocation:
77 */
78TRACE_EVENT(rcu_batch_end,
79
80 TP_PROTO(int callbacks_invoked),
81
82 TP_ARGS(callbacks_invoked),
83
84 TP_STRUCT__entry(
85 __field( int, callbacks_invoked )
86 ),
87
88 TP_fast_assign(
89 __entry->callbacks_invoked = callbacks_invoked;
90 ),
91
92 TP_printk("CBs-invoked=%d", __entry->callbacks_invoked)
93);
94
95#endif /* _TRACE_RCU_H */
96
97/* This part must be outside protection */
98#include <trace/define_trace.h>