Markers Implementation for RCU Preempt Tracing
PATCH 1/2 Markers Implementation for RCU Preempt Tracing
This patch converts Preempt RCU Tracing code infrastructure to implement markers.
- The rcupreempt_trace structure has been moved to the tracing infrastructure and de-linked from the rcupreempt.c code. A per-cpu instance of rcupreempt_trace structure will be maintained in rcupreempt_trace.c
- The above change also renders a few macro definitions unused (such as RCU_TRACE_CPU, RCU_TRACE_ME and RCU_TRACE_RDP) which have been removed.
- Some of the helper functions in rcupreempt.c which were exported only when CONFIG_RCU_TRACE was set are now exported unconditionally. These functions operate on per-cpu variables that are used both by the RCU and RCU Tracing code. The changes help in making RCU Tracing code operate as a kernel module also.
- The references to rcupreempt-boost tracing in the module initialisation and cleanup have been removed here to enable kernel build, but will be brought in after enclosing them inside a #ifdef CONFIG_PREEMPT_RCU_BOOST.
--- include/linux/rcupreempt.h | 10 ---- include/linux/rcupreempt_trace.h | 56 +++++++++++++----------- kernel/Kconfig.preempt | 7 +-- kernel/rcupreempt.c | 90 +++++++++++++-------------------------- kernel/rcupreempt_trace.c | 79 ++++++++++++++++++++++++++++++++-- 5 files changed, 140 insertions(+), 102 deletions(-)
include/linux/rcupreempt.h +0 -10
@@ -96,16 +96,6 @@ extern int rcu_pending_rt(int cpu);struct softirq_action ;extern void rcu_process_callbacks_rt (struct softirq_action *unused); -#ifdef CONFIG_RCU_TRACE -struct rcupreempt_trace ; -extern int *rcupreempt_flipctr (int cpu); -extern long rcupreempt_data_completed (void ); -extern int rcupreempt_flip_flag (int cpu); -extern int rcupreempt_mb_flag (int cpu); -extern char *rcupreempt_try_flip_state_name (void ); -extern struct rcupreempt_trace *rcupreempt_trace_cpu (int cpu); -#endif -struct softirq_action ;#ifdef CONFIG_NO_HZ
include/linux/rcupreempt_trace.h +31 -25
63 lines not on this page · raw message
kernel/rcupreempt.c +30 -60
237 lines not on this page · raw message
kernel/rcupreempt_trace.c +75 -4
120 lines not on this page · raw message
kernel/Kconfig.preempt +4 -3
@@ -172,14 +172,15 @@ config PREEMPT_RCU_BOOST possible OOM problems. config RCU_TRACE - bool "Enable tracing for RCU - currently stats in debugfs" + tristate "Enable tracing for RCU - currently stats in debugfs" select DEBUG_FS - default y + select MARKERS + default m help This option provides tracing in RCU which presents stats in debugfs for debugging RCU implementation. - Say Y here if you want to enable RCU tracing + Say Y/M here if you want to enable RCU tracing in-kernel/module. Say N if you are unsure. config SPINLOCK_BKL