aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-05-28 15:50:13 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-06-01 23:23:30 -0400
commit5e0a093910876882f91f1d4b8a1635a099e6c7ba (patch)
tree2e9fb5caa629c2f1f77f82a78863366b82ad05f6
parent2af15d6a44b871ad4c2a651302374cde8f335480 (diff)
tracing: fix config options to not show when automatically selected
There are two options that are selected by all tracers, but we want to have those options available when no tracer is selected. These are The event tracer and sched switch tracer. The are enabled by all tracers, but if a tracer is not selected we want the options to appear. All tracers including them select TRACING. Thus what we would like to do is: config EVENT_TRACER bool "prompt" depends on TRACING select TRACING But that gives us a bug in the kbuild system since we just created a circular dependency. We only want the prompt to show when TRACING is off. This patch adds GENERIC_TRACER that all tracers will select instead of TRACING. The two options (sched switch and event tracer) will select TRACING directly and depend on !GENERIC_TRACER. This solves the cicular dependency. [ Impact: hide options that are selected by default ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/Kconfig43
1 files changed, 28 insertions, 15 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index a508b9d2adb..6e55cc3ac49 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -56,6 +56,13 @@ config CONTEXT_SWITCH_TRACER
56 select MARKERS 56 select MARKERS
57 bool 57 bool
58 58
59# All tracer options should select GENERIC_TRACER. For those options that are
60# enabled by all tracers (context switch and event tracer) they select TRACING.
61# This allows those options to appear when no other tracer is selected. But the
62# options do not appear when something else selects it. We need the two options
63# GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the
64# hidding of the automatic options options.
65
59config TRACING 66config TRACING
60 bool 67 bool
61 select DEBUG_FS 68 select DEBUG_FS
@@ -66,6 +73,10 @@ config TRACING
66 select BINARY_PRINTF 73 select BINARY_PRINTF
67 select EVENT_TRACING 74 select EVENT_TRACING
68 75
76config GENERIC_TRACER
77 bool
78 select TRACING
79
69# 80#
70# Minimum requirements an architecture has to meet for us to 81# Minimum requirements an architecture has to meet for us to
71# be able to offer generic tracing facilities: 82# be able to offer generic tracing facilities:
@@ -95,7 +106,7 @@ config FUNCTION_TRACER
95 depends on HAVE_FUNCTION_TRACER 106 depends on HAVE_FUNCTION_TRACER
96 select FRAME_POINTER 107 select FRAME_POINTER
97 select KALLSYMS 108 select KALLSYMS
98 select TRACING 109 select GENERIC_TRACER
99 select CONTEXT_SWITCH_TRACER 110 select CONTEXT_SWITCH_TRACER
100 help 111 help
101 Enable the kernel to trace every kernel function. This is done 112 Enable the kernel to trace every kernel function. This is done
@@ -126,7 +137,7 @@ config IRQSOFF_TRACER
126 depends on TRACE_IRQFLAGS_SUPPORT 137 depends on TRACE_IRQFLAGS_SUPPORT
127 depends on GENERIC_TIME 138 depends on GENERIC_TIME
128 select TRACE_IRQFLAGS 139 select TRACE_IRQFLAGS
129 select TRACING 140 select GENERIC_TRACER
130 select TRACER_MAX_TRACE 141 select TRACER_MAX_TRACE
131 help 142 help
132 This option measures the time spent in irqs-off critical 143 This option measures the time spent in irqs-off critical
@@ -147,7 +158,7 @@ config PREEMPT_TRACER
147 default n 158 default n
148 depends on GENERIC_TIME 159 depends on GENERIC_TIME
149 depends on PREEMPT 160 depends on PREEMPT
150 select TRACING 161 select GENERIC_TRACER
151 select TRACER_MAX_TRACE 162 select TRACER_MAX_TRACE
152 help 163 help
153 This option measures the time spent in preemption off critical 164 This option measures the time spent in preemption off critical
@@ -166,7 +177,7 @@ config PREEMPT_TRACER
166config SYSPROF_TRACER 177config SYSPROF_TRACER
167 bool "Sysprof Tracer" 178 bool "Sysprof Tracer"
168 depends on X86 179 depends on X86
169 select TRACING 180 select GENERIC_TRACER
170 select CONTEXT_SWITCH_TRACER 181 select CONTEXT_SWITCH_TRACER
171 help 182 help
172 This tracer provides the trace needed by the 'Sysprof' userspace 183 This tracer provides the trace needed by the 'Sysprof' userspace
@@ -174,7 +185,7 @@ config SYSPROF_TRACER
174 185
175config SCHED_TRACER 186config SCHED_TRACER
176 bool "Scheduling Latency Tracer" 187 bool "Scheduling Latency Tracer"
177 select TRACING 188 select GENERIC_TRACER
178 select CONTEXT_SWITCH_TRACER 189 select CONTEXT_SWITCH_TRACER
179 select TRACER_MAX_TRACE 190 select TRACER_MAX_TRACE
180 help 191 help
@@ -183,6 +194,7 @@ config SCHED_TRACER
183 194
184config ENABLE_CONTEXT_SWITCH_TRACER 195config ENABLE_CONTEXT_SWITCH_TRACER
185 bool "Trace process context switches" 196 bool "Trace process context switches"
197 depends on !GENERIC_TRACER
186 select TRACING 198 select TRACING
187 select CONTEXT_SWITCH_TRACER 199 select CONTEXT_SWITCH_TRACER
188 help 200 help
@@ -191,6 +203,7 @@ config ENABLE_CONTEXT_SWITCH_TRACER
191 203
192config ENABLE_EVENT_TRACING 204config ENABLE_EVENT_TRACING
193 bool "Trace various events in the kernel" 205 bool "Trace various events in the kernel"
206 depends on !GENERIC_TRACER
194 select TRACING 207 select TRACING
195 help 208 help
196 This tracer hooks to various trace points in the kernel 209 This tracer hooks to various trace points in the kernel
@@ -204,14 +217,14 @@ config ENABLE_EVENT_TRACING
204config FTRACE_SYSCALLS 217config FTRACE_SYSCALLS
205 bool "Trace syscalls" 218 bool "Trace syscalls"
206 depends on HAVE_FTRACE_SYSCALLS 219 depends on HAVE_FTRACE_SYSCALLS
207 select TRACING 220 select GENERIC_TRACER
208 select KALLSYMS 221 select KALLSYMS
209 help 222 help
210 Basic tracer to catch the syscall entry and exit events. 223 Basic tracer to catch the syscall entry and exit events.
211 224
212config BOOT_TRACER 225config BOOT_TRACER
213 bool "Trace boot initcalls" 226 bool "Trace boot initcalls"
214 select TRACING 227 select GENERIC_TRACER
215 select CONTEXT_SWITCH_TRACER 228 select CONTEXT_SWITCH_TRACER
216 help 229 help
217 This tracer helps developers to optimize boot times: it records 230 This tracer helps developers to optimize boot times: it records
@@ -228,7 +241,7 @@ config BOOT_TRACER
228 241
229config TRACE_BRANCH_PROFILING 242config TRACE_BRANCH_PROFILING
230 bool 243 bool
231 select TRACING 244 select GENERIC_TRACER
232 245
233choice 246choice
234 prompt "Branch Profiling" 247 prompt "Branch Profiling"
@@ -308,7 +321,7 @@ config BRANCH_TRACER
308config POWER_TRACER 321config POWER_TRACER
309 bool "Trace power consumption behavior" 322 bool "Trace power consumption behavior"
310 depends on X86 323 depends on X86
311 select TRACING 324 select GENERIC_TRACER
312 help 325 help
313 This tracer helps developers to analyze and optimize the kernels 326 This tracer helps developers to analyze and optimize the kernels
314 power management decisions, specifically the C-state and P-state 327 power management decisions, specifically the C-state and P-state
@@ -342,14 +355,14 @@ config STACK_TRACER
342config HW_BRANCH_TRACER 355config HW_BRANCH_TRACER
343 depends on HAVE_HW_BRANCH_TRACER 356 depends on HAVE_HW_BRANCH_TRACER
344 bool "Trace hw branches" 357 bool "Trace hw branches"
345 select TRACING 358 select GENERIC_TRACER
346 help 359 help
347 This tracer records all branches on the system in a circular 360 This tracer records all branches on the system in a circular
348 buffer giving access to the last N branches for each cpu. 361 buffer giving access to the last N branches for each cpu.
349 362
350config KMEMTRACE 363config KMEMTRACE
351 bool "Trace SLAB allocations" 364 bool "Trace SLAB allocations"
352 select TRACING 365 select GENERIC_TRACER
353 help 366 help
354 kmemtrace provides tracing for slab allocator functions, such as 367 kmemtrace provides tracing for slab allocator functions, such as
355 kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected 368 kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected
@@ -369,7 +382,7 @@ config KMEMTRACE
369 382
370config WORKQUEUE_TRACER 383config WORKQUEUE_TRACER
371 bool "Trace workqueues" 384 bool "Trace workqueues"
372 select TRACING 385 select GENERIC_TRACER
373 help 386 help
374 The workqueue tracer provides some statistical informations 387 The workqueue tracer provides some statistical informations
375 about each cpu workqueue thread such as the number of the 388 about each cpu workqueue thread such as the number of the
@@ -385,7 +398,7 @@ config BLK_DEV_IO_TRACE
385 select RELAY 398 select RELAY
386 select DEBUG_FS 399 select DEBUG_FS
387 select TRACEPOINTS 400 select TRACEPOINTS
388 select TRACING 401 select GENERIC_TRACER
389 select STACKTRACE 402 select STACKTRACE
390 help 403 help
391 Say Y here if you want to be able to trace the block layer actions 404 Say Y here if you want to be able to trace the block layer actions
@@ -446,7 +459,7 @@ config FTRACE_SELFTEST
446 459
447config FTRACE_STARTUP_TEST 460config FTRACE_STARTUP_TEST
448 bool "Perform a startup test on ftrace" 461 bool "Perform a startup test on ftrace"
449 depends on TRACING 462 depends on GENERIC_TRACER
450 select FTRACE_SELFTEST 463 select FTRACE_SELFTEST
451 help 464 help
452 This option performs a series of startup tests on ftrace. On bootup 465 This option performs a series of startup tests on ftrace. On bootup
@@ -457,7 +470,7 @@ config FTRACE_STARTUP_TEST
457config MMIOTRACE 470config MMIOTRACE
458 bool "Memory mapped IO tracing" 471 bool "Memory mapped IO tracing"
459 depends on HAVE_MMIOTRACE_SUPPORT && PCI 472 depends on HAVE_MMIOTRACE_SUPPORT && PCI
460 select TRACING 473 select GENERIC_TRACER
461 help 474 help
462 Mmiotrace traces Memory Mapped I/O access and is meant for 475 Mmiotrace traces Memory Mapped I/O access and is meant for
463 debugging and reverse engineering. It is called from the ioremap 476 debugging and reverse engineering. It is called from the ioremap