aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/Kconfig')
-rw-r--r--kernel/trace/Kconfig143
1 files changed, 110 insertions, 33 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 417d1985e299..4a13e5a01ce3 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -48,6 +48,21 @@ config FTRACE_NMI_ENTER
48 depends on HAVE_FTRACE_NMI_ENTER 48 depends on HAVE_FTRACE_NMI_ENTER
49 default y 49 default y
50 50
51config EVENT_TRACING
52 select CONTEXT_SWITCH_TRACER
53 bool
54
55config CONTEXT_SWITCH_TRACER
56 select MARKERS
57 bool
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
51config TRACING 66config TRACING
52 bool 67 bool
53 select DEBUG_FS 68 select DEBUG_FS
@@ -56,6 +71,11 @@ config TRACING
56 select TRACEPOINTS 71 select TRACEPOINTS
57 select NOP_TRACER 72 select NOP_TRACER
58 select BINARY_PRINTF 73 select BINARY_PRINTF
74 select EVENT_TRACING
75
76config GENERIC_TRACER
77 bool
78 select TRACING
59 79
60# 80#
61# Minimum requirements an architecture has to meet for us to 81# Minimum requirements an architecture has to meet for us to
@@ -73,14 +93,20 @@ config TRACING_SUPPORT
73 93
74if TRACING_SUPPORT 94if TRACING_SUPPORT
75 95
76menu "Tracers" 96menuconfig FTRACE
97 bool "Tracers"
98 default y if DEBUG_KERNEL
99 help
100 Enable the kernel tracing infrastructure.
101
102if FTRACE
77 103
78config FUNCTION_TRACER 104config FUNCTION_TRACER
79 bool "Kernel Function Tracer" 105 bool "Kernel Function Tracer"
80 depends on HAVE_FUNCTION_TRACER 106 depends on HAVE_FUNCTION_TRACER
81 select FRAME_POINTER 107 select FRAME_POINTER
82 select KALLSYMS 108 select KALLSYMS
83 select TRACING 109 select GENERIC_TRACER
84 select CONTEXT_SWITCH_TRACER 110 select CONTEXT_SWITCH_TRACER
85 help 111 help
86 Enable the kernel to trace every kernel function. This is done 112 Enable the kernel to trace every kernel function. This is done
@@ -104,13 +130,14 @@ config FUNCTION_GRAPH_TRACER
104 the return value. This is done by setting the current return 130 the return value. This is done by setting the current return
105 address on the current task structure into a stack of calls. 131 address on the current task structure into a stack of calls.
106 132
133
107config IRQSOFF_TRACER 134config IRQSOFF_TRACER
108 bool "Interrupts-off Latency Tracer" 135 bool "Interrupts-off Latency Tracer"
109 default n 136 default n
110 depends on TRACE_IRQFLAGS_SUPPORT 137 depends on TRACE_IRQFLAGS_SUPPORT
111 depends on GENERIC_TIME 138 depends on GENERIC_TIME
112 select TRACE_IRQFLAGS 139 select TRACE_IRQFLAGS
113 select TRACING 140 select GENERIC_TRACER
114 select TRACER_MAX_TRACE 141 select TRACER_MAX_TRACE
115 help 142 help
116 This option measures the time spent in irqs-off critical 143 This option measures the time spent in irqs-off critical
@@ -131,7 +158,7 @@ config PREEMPT_TRACER
131 default n 158 default n
132 depends on GENERIC_TIME 159 depends on GENERIC_TIME
133 depends on PREEMPT 160 depends on PREEMPT
134 select TRACING 161 select GENERIC_TRACER
135 select TRACER_MAX_TRACE 162 select TRACER_MAX_TRACE
136 help 163 help
137 This option measures the time spent in preemption off critical 164 This option measures the time spent in preemption off critical
@@ -150,7 +177,7 @@ config PREEMPT_TRACER
150config SYSPROF_TRACER 177config SYSPROF_TRACER
151 bool "Sysprof Tracer" 178 bool "Sysprof Tracer"
152 depends on X86 179 depends on X86
153 select TRACING 180 select GENERIC_TRACER
154 select CONTEXT_SWITCH_TRACER 181 select CONTEXT_SWITCH_TRACER
155 help 182 help
156 This tracer provides the trace needed by the 'Sysprof' userspace 183 This tracer provides the trace needed by the 'Sysprof' userspace
@@ -158,40 +185,33 @@ config SYSPROF_TRACER
158 185
159config SCHED_TRACER 186config SCHED_TRACER
160 bool "Scheduling Latency Tracer" 187 bool "Scheduling Latency Tracer"
161 select TRACING 188 select GENERIC_TRACER
162 select CONTEXT_SWITCH_TRACER 189 select CONTEXT_SWITCH_TRACER
163 select TRACER_MAX_TRACE 190 select TRACER_MAX_TRACE
164 help 191 help
165 This tracer tracks the latency of the highest priority task 192 This tracer tracks the latency of the highest priority task
166 to be scheduled in, starting from the point it has woken up. 193 to be scheduled in, starting from the point it has woken up.
167 194
168config CONTEXT_SWITCH_TRACER 195config ENABLE_DEFAULT_TRACERS
169 bool "Trace process context switches" 196 bool "Trace process context switches and events"
170 select TRACING 197 depends on !GENERIC_TRACER
171 select MARKERS
172 help
173 This tracer gets called from the context switch and records
174 all switching of tasks.
175
176config EVENT_TRACER
177 bool "Trace various events in the kernel"
178 select TRACING 198 select TRACING
179 help 199 help
180 This tracer hooks to various trace points in the kernel 200 This tracer hooks to various trace points in the kernel
181 allowing the user to pick and choose which trace point they 201 allowing the user to pick and choose which trace point they
182 want to trace. 202 want to trace. It also includes the sched_switch tracer plugin.
183 203
184config FTRACE_SYSCALLS 204config FTRACE_SYSCALLS
185 bool "Trace syscalls" 205 bool "Trace syscalls"
186 depends on HAVE_FTRACE_SYSCALLS 206 depends on HAVE_FTRACE_SYSCALLS
187 select TRACING 207 select GENERIC_TRACER
188 select KALLSYMS 208 select KALLSYMS
189 help 209 help
190 Basic tracer to catch the syscall entry and exit events. 210 Basic tracer to catch the syscall entry and exit events.
191 211
192config BOOT_TRACER 212config BOOT_TRACER
193 bool "Trace boot initcalls" 213 bool "Trace boot initcalls"
194 select TRACING 214 select GENERIC_TRACER
195 select CONTEXT_SWITCH_TRACER 215 select CONTEXT_SWITCH_TRACER
196 help 216 help
197 This tracer helps developers to optimize boot times: it records 217 This tracer helps developers to optimize boot times: it records
@@ -207,8 +227,36 @@ config BOOT_TRACER
207 to enable this on bootup. 227 to enable this on bootup.
208 228
209config TRACE_BRANCH_PROFILING 229config TRACE_BRANCH_PROFILING
230 bool
231 select GENERIC_TRACER
232
233choice
234 prompt "Branch Profiling"
235 default BRANCH_PROFILE_NONE
236 help
237 The branch profiling is a software profiler. It will add hooks
238 into the C conditionals to test which path a branch takes.
239
240 The likely/unlikely profiler only looks at the conditions that
241 are annotated with a likely or unlikely macro.
242
243 The "all branch" profiler will profile every if statement in the
244 kernel. This profiler will also enable the likely/unlikely
245 profiler as well.
246
247 Either of the above profilers add a bit of overhead to the system.
248 If unsure choose "No branch profiling".
249
250config BRANCH_PROFILE_NONE
251 bool "No branch profiling"
252 help
253 No branch profiling. Branch profiling adds a bit of overhead.
254 Only enable it if you want to analyse the branching behavior.
255 Otherwise keep it disabled.
256
257config PROFILE_ANNOTATED_BRANCHES
210 bool "Trace likely/unlikely profiler" 258 bool "Trace likely/unlikely profiler"
211 select TRACING 259 select TRACE_BRANCH_PROFILING
212 help 260 help
213 This tracer profiles all the the likely and unlikely macros 261 This tracer profiles all the the likely and unlikely macros
214 in the kernel. It will display the results in: 262 in the kernel. It will display the results in:
@@ -218,11 +266,9 @@ config TRACE_BRANCH_PROFILING
218 Note: this will add a significant overhead, only turn this 266 Note: this will add a significant overhead, only turn this
219 on if you need to profile the system's use of these macros. 267 on if you need to profile the system's use of these macros.
220 268
221 Say N if unsure.
222
223config PROFILE_ALL_BRANCHES 269config PROFILE_ALL_BRANCHES
224 bool "Profile all if conditionals" 270 bool "Profile all if conditionals"
225 depends on TRACE_BRANCH_PROFILING 271 select TRACE_BRANCH_PROFILING
226 help 272 help
227 This tracer profiles all branch conditions. Every if () 273 This tracer profiles all branch conditions. Every if ()
228 taken in the kernel is recorded whether it hit or miss. 274 taken in the kernel is recorded whether it hit or miss.
@@ -230,11 +276,12 @@ config PROFILE_ALL_BRANCHES
230 276
231 /debugfs/tracing/profile_branch 277 /debugfs/tracing/profile_branch
232 278
279 This option also enables the likely/unlikely profiler.
280
233 This configuration, when enabled, will impose a great overhead 281 This configuration, when enabled, will impose a great overhead
234 on the system. This should only be enabled when the system 282 on the system. This should only be enabled when the system
235 is to be analyzed 283 is to be analyzed
236 284endchoice
237 Say N if unsure.
238 285
239config TRACING_BRANCHES 286config TRACING_BRANCHES
240 bool 287 bool
@@ -261,7 +308,7 @@ config BRANCH_TRACER
261config POWER_TRACER 308config POWER_TRACER
262 bool "Trace power consumption behavior" 309 bool "Trace power consumption behavior"
263 depends on X86 310 depends on X86
264 select TRACING 311 select GENERIC_TRACER
265 help 312 help
266 This tracer helps developers to analyze and optimize the kernels 313 This tracer helps developers to analyze and optimize the kernels
267 power management decisions, specifically the C-state and P-state 314 power management decisions, specifically the C-state and P-state
@@ -295,14 +342,14 @@ config STACK_TRACER
295config HW_BRANCH_TRACER 342config HW_BRANCH_TRACER
296 depends on HAVE_HW_BRANCH_TRACER 343 depends on HAVE_HW_BRANCH_TRACER
297 bool "Trace hw branches" 344 bool "Trace hw branches"
298 select TRACING 345 select GENERIC_TRACER
299 help 346 help
300 This tracer records all branches on the system in a circular 347 This tracer records all branches on the system in a circular
301 buffer giving access to the last N branches for each cpu. 348 buffer giving access to the last N branches for each cpu.
302 349
303config KMEMTRACE 350config KMEMTRACE
304 bool "Trace SLAB allocations" 351 bool "Trace SLAB allocations"
305 select TRACING 352 select GENERIC_TRACER
306 help 353 help
307 kmemtrace provides tracing for slab allocator functions, such as 354 kmemtrace provides tracing for slab allocator functions, such as
308 kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected 355 kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected
@@ -322,7 +369,7 @@ config KMEMTRACE
322 369
323config WORKQUEUE_TRACER 370config WORKQUEUE_TRACER
324 bool "Trace workqueues" 371 bool "Trace workqueues"
325 select TRACING 372 select GENERIC_TRACER
326 help 373 help
327 The workqueue tracer provides some statistical informations 374 The workqueue tracer provides some statistical informations
328 about each cpu workqueue thread such as the number of the 375 about each cpu workqueue thread such as the number of the
@@ -338,7 +385,7 @@ config BLK_DEV_IO_TRACE
338 select RELAY 385 select RELAY
339 select DEBUG_FS 386 select DEBUG_FS
340 select TRACEPOINTS 387 select TRACEPOINTS
341 select TRACING 388 select GENERIC_TRACER
342 select STACKTRACE 389 select STACKTRACE
343 help 390 help
344 Say Y here if you want to be able to trace the block layer actions 391 Say Y here if you want to be able to trace the block layer actions
@@ -375,6 +422,20 @@ config DYNAMIC_FTRACE
375 were made. If so, it runs stop_machine (stops all CPUS) 422 were made. If so, it runs stop_machine (stops all CPUS)
376 and modifies the code to jump over the call to ftrace. 423 and modifies the code to jump over the call to ftrace.
377 424
425config FUNCTION_PROFILER
426 bool "Kernel function profiler"
427 depends on FUNCTION_TRACER
428 default n
429 help
430 This option enables the kernel function profiler. A file is created
431 in debugfs called function_profile_enabled which defaults to zero.
432 When a 1 is echoed into this file profiling begins, and when a
433 zero is entered, profiling stops. A file in the trace_stats
434 directory called functions, that show the list of functions that
435 have been hit and their counters.
436
437 If in doubt, say N
438
378config FTRACE_MCOUNT_RECORD 439config FTRACE_MCOUNT_RECORD
379 def_bool y 440 def_bool y
380 depends on DYNAMIC_FTRACE 441 depends on DYNAMIC_FTRACE
@@ -385,7 +446,7 @@ config FTRACE_SELFTEST
385 446
386config FTRACE_STARTUP_TEST 447config FTRACE_STARTUP_TEST
387 bool "Perform a startup test on ftrace" 448 bool "Perform a startup test on ftrace"
388 depends on TRACING 449 depends on GENERIC_TRACER
389 select FTRACE_SELFTEST 450 select FTRACE_SELFTEST
390 help 451 help
391 This option performs a series of startup tests on ftrace. On bootup 452 This option performs a series of startup tests on ftrace. On bootup
@@ -396,7 +457,7 @@ config FTRACE_STARTUP_TEST
396config MMIOTRACE 457config MMIOTRACE
397 bool "Memory mapped IO tracing" 458 bool "Memory mapped IO tracing"
398 depends on HAVE_MMIOTRACE_SUPPORT && PCI 459 depends on HAVE_MMIOTRACE_SUPPORT && PCI
399 select TRACING 460 select GENERIC_TRACER
400 help 461 help
401 Mmiotrace traces Memory Mapped I/O access and is meant for 462 Mmiotrace traces Memory Mapped I/O access and is meant for
402 debugging and reverse engineering. It is called from the ioremap 463 debugging and reverse engineering. It is called from the ioremap
@@ -416,7 +477,23 @@ config MMIOTRACE_TEST
416 477
417 Say N, unless you absolutely know what you are doing. 478 Say N, unless you absolutely know what you are doing.
418 479
419endmenu 480config RING_BUFFER_BENCHMARK
481 tristate "Ring buffer benchmark stress tester"
482 depends on RING_BUFFER
483 help
484 This option creates a test to stress the ring buffer and bench mark it.
485 It creates its own ring buffer such that it will not interfer with
486 any other users of the ring buffer (such as ftrace). It then creates
487 a producer and consumer that will run for 10 seconds and sleep for
488 10 seconds. Each interval it will print out the number of events
489 it recorded and give a rough estimate of how long each iteration took.
490
491 It does not disable interrupts or raise its priority, so it may be
492 affected by processes that are running.
493
494 If unsure, say N
495
496endif # FTRACE
420 497
421endif # TRACING_SUPPORT 498endif # TRACING_SUPPORT
422 499