aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-06-19 01:26:31 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:38:13 -0400
commit300df91ca9358f7f09298eec9503c12b32054ef7 (patch)
tree8917e0c2ee94a5385f4968094c0e1d9a7fdc0055 /include/trace
parent29c00b4a1d9e277786120032aa8364631820d863 (diff)
rcu: Event-trace markers for computing RCU CPU utilization
This commit adds the trace_rcu_utilization() marker that is to be used to allow postprocessing scripts compute RCU's CPU utilization, give or take event-trace overhead. Note that we do not include RCU's dyntick-idle interface because event tracing requires RCU protection, which is not available in dyntick-idle mode. 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.h73
1 files changed, 53 insertions, 20 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index db3f6e9e63e6..ab458eb689fb 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -7,29 +7,58 @@
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8 8
9/* 9/*
10 * Tracepoint for calling rcu_do_batch, performed to start callback invocation: 10 * Tracepoint for start/end markers used for utilization calculations.
11 * By convention, the string is of the following forms:
12 *
13 * "Start <activity>" -- Mark the start of the specified activity,
14 * such as "context switch". Nesting is permitted.
15 * "End <activity>" -- Mark the end of the specified activity.
16 */
17TRACE_EVENT(rcu_utilization,
18
19 TP_PROTO(char *s),
20
21 TP_ARGS(s),
22
23 TP_STRUCT__entry(
24 __field(char *, s)
25 ),
26
27 TP_fast_assign(
28 __entry->s = s;
29 ),
30
31 TP_printk("%s", __entry->s)
32);
33
34/*
35 * Tracepoint for marking the beginning rcu_do_batch, performed to start
36 * RCU callback invocation. The first argument is the total number of
37 * callbacks (including those that are not yet ready to be invoked),
38 * and the second argument is the current RCU-callback batch limit.
11 */ 39 */
12TRACE_EVENT(rcu_batch_start, 40TRACE_EVENT(rcu_batch_start,
13 41
14 TP_PROTO(long callbacks_ready, int blimit), 42 TP_PROTO(long qlen, int blimit),
15 43
16 TP_ARGS(callbacks_ready, blimit), 44 TP_ARGS(qlen, blimit),
17 45
18 TP_STRUCT__entry( 46 TP_STRUCT__entry(
19 __field( long, callbacks_ready ) 47 __field(long, qlen)
20 __field( int, blimit ) 48 __field(int, blimit)
21 ), 49 ),
22 50
23 TP_fast_assign( 51 TP_fast_assign(
24 __entry->callbacks_ready = callbacks_ready; 52 __entry->qlen = qlen;
25 __entry->blimit = blimit; 53 __entry->blimit = blimit;
26 ), 54 ),
27 55
28 TP_printk("CBs=%ld bl=%d", __entry->callbacks_ready, __entry->blimit) 56 TP_printk("CBs=%ld bl=%d", __entry->qlen, __entry->blimit)
29); 57);
30 58
31/* 59/*
32 * Tracepoint for the invocation of a single RCU callback 60 * Tracepoint for the invocation of a single RCU callback function.
61 * The argument is a pointer to the RCU callback itself.
33 */ 62 */
34TRACE_EVENT(rcu_invoke_callback, 63TRACE_EVENT(rcu_invoke_callback,
35 64
@@ -38,20 +67,23 @@ TRACE_EVENT(rcu_invoke_callback,
38 TP_ARGS(rhp), 67 TP_ARGS(rhp),
39 68
40 TP_STRUCT__entry( 69 TP_STRUCT__entry(
41 __field( void *, rhp ) 70 __field(void *, rhp)
42 __field( void *, func ) 71 __field(void *, func)
43 ), 72 ),
44 73
45 TP_fast_assign( 74 TP_fast_assign(
46 __entry->rhp = rhp; 75 __entry->rhp = rhp;
47 __entry->func = rhp->func; 76 __entry->func = rhp->func;
48 ), 77 ),
49 78
50 TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func) 79 TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func)
51); 80);
52 81
53/* 82/*
54 * Tracepoint for the invocation of a single RCU kfree callback 83 * Tracepoint for the invocation of a single RCU callback of the special
84 * kfree() form. The first argument is a pointer to the RCU callback
85 * and the second argument is the offset of the callback within the
86 * enclosing RCU-protected data structure.
55 */ 87 */
56TRACE_EVENT(rcu_invoke_kfree_callback, 88TRACE_EVENT(rcu_invoke_kfree_callback,
57 89
@@ -60,12 +92,12 @@ TRACE_EVENT(rcu_invoke_kfree_callback,
60 TP_ARGS(rhp, offset), 92 TP_ARGS(rhp, offset),
61 93
62 TP_STRUCT__entry( 94 TP_STRUCT__entry(
63 __field(void *, rhp ) 95 __field(void *, rhp)
64 __field(unsigned long, offset ) 96 __field(unsigned long, offset)
65 ), 97 ),
66 98
67 TP_fast_assign( 99 TP_fast_assign(
68 __entry->rhp = rhp; 100 __entry->rhp = rhp;
69 __entry->offset = offset; 101 __entry->offset = offset;
70 ), 102 ),
71 103
@@ -73,7 +105,8 @@ TRACE_EVENT(rcu_invoke_kfree_callback,
73); 105);
74 106
75/* 107/*
76 * Tracepoint for leaving rcu_do_batch, performed after callback invocation: 108 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
109 * invoked. The first argument is the number of callbacks actually invoked.
77 */ 110 */
78TRACE_EVENT(rcu_batch_end, 111TRACE_EVENT(rcu_batch_end,
79 112
@@ -82,11 +115,11 @@ TRACE_EVENT(rcu_batch_end,
82 TP_ARGS(callbacks_invoked), 115 TP_ARGS(callbacks_invoked),
83 116
84 TP_STRUCT__entry( 117 TP_STRUCT__entry(
85 __field( int, callbacks_invoked ) 118 __field(int, callbacks_invoked)
86 ), 119 ),
87 120
88 TP_fast_assign( 121 TP_fast_assign(
89 __entry->callbacks_invoked = callbacks_invoked; 122 __entry->callbacks_invoked = callbacks_invoked;
90 ), 123 ),
91 124
92 TP_printk("CBs-invoked=%d", __entry->callbacks_invoked) 125 TP_printk("CBs-invoked=%d", __entry->callbacks_invoked)