aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-12-07 19:32:40 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-12-11 13:32:22 -0500
commit4968c300e1fa5389fdf1f1ebd8b8e4aec9aa4a9e (patch)
tree3424a8c3d2543096acad7319ec57fa8f62813620 /include/trace/events
parent101db7b41d8d6c070278bca1f7bce814ecbf781d (diff)
rcu: Augment rcu_batch_end tracing for idle and callback state
The current rcu_batch_end event trace records only the name of the RCU flavor and the total number of callbacks that remain queued on the current CPU. This is insufficient for testing and tuning the new dyntick-idle RCU_FAST_NO_HZ code, so this commit adds idle state along with whether or not any of the callbacks that were ready to invoke at the beginning of rcu_do_batch() are still queued. 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/events')
-rw-r--r--include/trace/events/rcu.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index c75418c3ccb..d2d88bed891 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -461,27 +461,46 @@ TRACE_EVENT(rcu_invoke_kfree_callback,
461 461
462/* 462/*
463 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been 463 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
464 * invoked. The first argument is the name of the RCU flavor and 464 * invoked. The first argument is the name of the RCU flavor,
465 * the second argument is number of callbacks actually invoked. 465 * the second argument is number of callbacks actually invoked,
466 * the third argument (cb) is whether or not any of the callbacks that
467 * were ready to invoke at the beginning of this batch are still
468 * queued, the fourth argument (nr) is the return value of need_resched(),
469 * the fifth argument (iit) is 1 if the current task is the idle task,
470 * and the sixth argument (risk) is the return value from
471 * rcu_is_callbacks_kthread().
466 */ 472 */
467TRACE_EVENT(rcu_batch_end, 473TRACE_EVENT(rcu_batch_end,
468 474
469 TP_PROTO(char *rcuname, int callbacks_invoked), 475 TP_PROTO(char *rcuname, int callbacks_invoked,
476 bool cb, bool nr, bool iit, bool risk),
470 477
471 TP_ARGS(rcuname, callbacks_invoked), 478 TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk),
472 479
473 TP_STRUCT__entry( 480 TP_STRUCT__entry(
474 __field(char *, rcuname) 481 __field(char *, rcuname)
475 __field(int, callbacks_invoked) 482 __field(int, callbacks_invoked)
483 __field(bool, cb)
484 __field(bool, nr)
485 __field(bool, iit)
486 __field(bool, risk)
476 ), 487 ),
477 488
478 TP_fast_assign( 489 TP_fast_assign(
479 __entry->rcuname = rcuname; 490 __entry->rcuname = rcuname;
480 __entry->callbacks_invoked = callbacks_invoked; 491 __entry->callbacks_invoked = callbacks_invoked;
481 ), 492 __entry->cb = cb;
482 493 __entry->nr = nr;
483 TP_printk("%s CBs-invoked=%d", 494 __entry->iit = iit;
484 __entry->rcuname, __entry->callbacks_invoked) 495 __entry->risk = risk;
496 ),
497
498 TP_printk("%s CBs-invoked=%d idle=%c%c%c%c",
499 __entry->rcuname, __entry->callbacks_invoked,
500 __entry->cb ? 'C' : '.',
501 __entry->nr ? 'S' : '.',
502 __entry->iit ? 'I' : '.',
503 __entry->risk ? 'R' : '.')
485); 504);
486 505
487/* 506/*
@@ -524,7 +543,8 @@ TRACE_EVENT(rcu_torture_read,
524#define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) 543#define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0)
525#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) 544#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
526#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) 545#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
527#define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0) 546#define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \
547 do { } while (0)
528#define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) 548#define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0)
529 549
530#endif /* #else #ifdef CONFIG_RCU_TRACE */ 550#endif /* #else #ifdef CONFIG_RCU_TRACE */