aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-06-21 04:14:54 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:38:15 -0400
commit72fe701b70e6ced35d734b676c13efbc8fc769a9 (patch)
tree87bece8406b18e27409a33355c384c9f759915ae
parente99033c5c160f1f247c665923a66acec693a967c (diff)
rcu: Add RCU type to callback-invocation tracing
Add a string to the rcu_batch_start() and rcu_batch_end() trace messages that indicates the RCU type ("rcu_sched", "rcu_bh", or "rcu_preempt"). The trace messages for the actual invocations themselves are not marked, as it should be clear from the rcu_batch_start() and rcu_batch_end() events before and after. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--include/trace/events/rcu.h28
-rw-r--r--kernel/rcutiny.c8
-rw-r--r--kernel/rcutree.c8
3 files changed, 26 insertions, 18 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index ab458eb689fb..508824e5a77d 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -33,27 +33,31 @@ TRACE_EVENT(rcu_utilization,
33 33
34/* 34/*
35 * Tracepoint for marking the beginning rcu_do_batch, performed to start 35 * Tracepoint for marking the beginning rcu_do_batch, performed to start
36 * RCU callback invocation. The first argument is the total number of 36 * RCU callback invocation. The first argument is the RCU flavor,
37 * callbacks (including those that are not yet ready to be invoked), 37 * the second is the total number of callbacks (including those that
38 * and the second argument is the current RCU-callback batch limit. 38 * are not yet ready to be invoked), and the third argument is the
39 * current RCU-callback batch limit.
39 */ 40 */
40TRACE_EVENT(rcu_batch_start, 41TRACE_EVENT(rcu_batch_start,
41 42
42 TP_PROTO(long qlen, int blimit), 43 TP_PROTO(char *rcuname, long qlen, int blimit),
43 44
44 TP_ARGS(qlen, blimit), 45 TP_ARGS(rcuname, qlen, blimit),
45 46
46 TP_STRUCT__entry( 47 TP_STRUCT__entry(
48 __field(char *, rcuname)
47 __field(long, qlen) 49 __field(long, qlen)
48 __field(int, blimit) 50 __field(int, blimit)
49 ), 51 ),
50 52
51 TP_fast_assign( 53 TP_fast_assign(
54 __entry->rcuname = rcuname;
52 __entry->qlen = qlen; 55 __entry->qlen = qlen;
53 __entry->blimit = blimit; 56 __entry->blimit = blimit;
54 ), 57 ),
55 58
56 TP_printk("CBs=%ld bl=%d", __entry->qlen, __entry->blimit) 59 TP_printk("%s CBs=%ld bl=%d",
60 __entry->rcuname, __entry->qlen, __entry->blimit)
57); 61);
58 62
59/* 63/*
@@ -106,23 +110,27 @@ TRACE_EVENT(rcu_invoke_kfree_callback,
106 110
107/* 111/*
108 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been 112 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
109 * invoked. The first argument is the number of callbacks actually invoked. 113 * invoked. The first argument is the name of the RCU flavor and
114 * the second argument is number of callbacks actually invoked.
110 */ 115 */
111TRACE_EVENT(rcu_batch_end, 116TRACE_EVENT(rcu_batch_end,
112 117
113 TP_PROTO(int callbacks_invoked), 118 TP_PROTO(char *rcuname, int callbacks_invoked),
114 119
115 TP_ARGS(callbacks_invoked), 120 TP_ARGS(rcuname, callbacks_invoked),
116 121
117 TP_STRUCT__entry( 122 TP_STRUCT__entry(
123 __field(char *, rcuname)
118 __field(int, callbacks_invoked) 124 __field(int, callbacks_invoked)
119 ), 125 ),
120 126
121 TP_fast_assign( 127 TP_fast_assign(
128 __entry->rcuname = rcuname;
122 __entry->callbacks_invoked = callbacks_invoked; 129 __entry->callbacks_invoked = callbacks_invoked;
123 ), 130 ),
124 131
125 TP_printk("CBs-invoked=%d", __entry->callbacks_invoked) 132 TP_printk("%s CBs-invoked=%d",
133 __entry->rcuname, __entry->callbacks_invoked)
126); 134);
127 135
128#endif /* _TRACE_RCU_H */ 136#endif /* _TRACE_RCU_H */
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 0d28974b78f4..1c37bdd464f1 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -168,14 +168,14 @@ static void rcu_process_callbacks(struct rcu_ctrlblk *rcp)
168 168
169 /* If no RCU callbacks ready to invoke, just return. */ 169 /* If no RCU callbacks ready to invoke, just return. */
170 if (&rcp->rcucblist == rcp->donetail) { 170 if (&rcp->rcucblist == rcp->donetail) {
171 RCU_TRACE(trace_rcu_batch_start(0, -1)); 171 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, -1));
172 RCU_TRACE(trace_rcu_batch_end(0)); 172 RCU_TRACE(trace_rcu_batch_end(rcp->name, 0));
173 return; 173 return;
174 } 174 }
175 175
176 /* Move the ready-to-invoke callbacks to a local list. */ 176 /* Move the ready-to-invoke callbacks to a local list. */
177 local_irq_save(flags); 177 local_irq_save(flags);
178 RCU_TRACE(trace_rcu_batch_start(0, -1)); 178 RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, -1));
179 list = rcp->rcucblist; 179 list = rcp->rcucblist;
180 rcp->rcucblist = *rcp->donetail; 180 rcp->rcucblist = *rcp->donetail;
181 *rcp->donetail = NULL; 181 *rcp->donetail = NULL;
@@ -197,7 +197,7 @@ static void rcu_process_callbacks(struct rcu_ctrlblk *rcp)
197 RCU_TRACE(cb_count++); 197 RCU_TRACE(cb_count++);
198 } 198 }
199 RCU_TRACE(rcu_trace_sub_qlen(rcp, cb_count)); 199 RCU_TRACE(rcu_trace_sub_qlen(rcp, cb_count));
200 RCU_TRACE(trace_rcu_batch_end(cb_count)); 200 RCU_TRACE(trace_rcu_batch_end(rcp->name, cb_count));
201} 201}
202 202
203/* 203/*
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index b953e2c72e25..eb6e731088a0 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1199,8 +1199,8 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1199 1199
1200 /* If no callbacks are ready, just return.*/ 1200 /* If no callbacks are ready, just return.*/
1201 if (!cpu_has_callbacks_ready_to_invoke(rdp)) { 1201 if (!cpu_has_callbacks_ready_to_invoke(rdp)) {
1202 trace_rcu_batch_start(0, 0); 1202 trace_rcu_batch_start(rsp->name, 0, 0);
1203 trace_rcu_batch_end(0); 1203 trace_rcu_batch_end(rsp->name, 0);
1204 return; 1204 return;
1205 } 1205 }
1206 1206
@@ -1210,7 +1210,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1210 */ 1210 */
1211 local_irq_save(flags); 1211 local_irq_save(flags);
1212 bl = rdp->blimit; 1212 bl = rdp->blimit;
1213 trace_rcu_batch_start(rdp->qlen, bl); 1213 trace_rcu_batch_start(rsp->name, rdp->qlen, bl);
1214 list = rdp->nxtlist; 1214 list = rdp->nxtlist;
1215 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL]; 1215 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL];
1216 *rdp->nxttail[RCU_DONE_TAIL] = NULL; 1216 *rdp->nxttail[RCU_DONE_TAIL] = NULL;
@@ -1233,7 +1233,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
1233 } 1233 }
1234 1234
1235 local_irq_save(flags); 1235 local_irq_save(flags);
1236 trace_rcu_batch_end(count); 1236 trace_rcu_batch_end(rsp->name, count);
1237 1237
1238 /* Update count, and requeue any remaining callbacks. */ 1238 /* Update count, and requeue any remaining callbacks. */
1239 rdp->qlen -= count; 1239 rdp->qlen -= count;