aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/Kconfig')
-rw-r--r--kernel/trace/Kconfig155
1 files changed, 136 insertions, 19 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index e2a4ff6fc3a6..2246141bda4d 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -9,6 +9,9 @@ config USER_STACKTRACE_SUPPORT
9config NOP_TRACER 9config NOP_TRACER
10 bool 10 bool
11 11
12config HAVE_FTRACE_NMI_ENTER
13 bool
14
12config HAVE_FUNCTION_TRACER 15config HAVE_FUNCTION_TRACER
13 bool 16 bool
14 17
@@ -31,12 +34,20 @@ config HAVE_FTRACE_MCOUNT_RECORD
31config HAVE_HW_BRANCH_TRACER 34config HAVE_HW_BRANCH_TRACER
32 bool 35 bool
33 36
37config HAVE_FTRACE_SYSCALLS
38 bool
39
34config TRACER_MAX_TRACE 40config TRACER_MAX_TRACE
35 bool 41 bool
36 42
37config RING_BUFFER 43config RING_BUFFER
38 bool 44 bool
39 45
46config FTRACE_NMI_ENTER
47 bool
48 depends on HAVE_FTRACE_NMI_ENTER
49 default y
50
40config TRACING 51config TRACING
41 bool 52 bool
42 select DEBUG_FS 53 select DEBUG_FS
@@ -44,14 +55,31 @@ config TRACING
44 select STACKTRACE if STACKTRACE_SUPPORT 55 select STACKTRACE if STACKTRACE_SUPPORT
45 select TRACEPOINTS 56 select TRACEPOINTS
46 select NOP_TRACER 57 select NOP_TRACER
58 select BINARY_PRINTF
59
60#
61# Minimum requirements an architecture has to meet for us to
62# be able to offer generic tracing facilities:
63#
64config TRACING_SUPPORT
65 bool
66 # PPC32 has no irqflags tracing support, but it can use most of the
67 # tracers anyway, they were tested to build and work. Note that new
68 # exceptions to this list aren't welcomed, better implement the
69 # irqflags tracing for your architecture.
70 depends on TRACE_IRQFLAGS_SUPPORT || PPC32
71 depends on STACKTRACE_SUPPORT
72 default y
73
74if TRACING_SUPPORT
47 75
48menu "Tracers" 76menu "Tracers"
49 77
50config FUNCTION_TRACER 78config FUNCTION_TRACER
51 bool "Kernel Function Tracer" 79 bool "Kernel Function Tracer"
52 depends on HAVE_FUNCTION_TRACER 80 depends on HAVE_FUNCTION_TRACER
53 depends on DEBUG_KERNEL
54 select FRAME_POINTER 81 select FRAME_POINTER
82 select KALLSYMS
55 select TRACING 83 select TRACING
56 select CONTEXT_SWITCH_TRACER 84 select CONTEXT_SWITCH_TRACER
57 help 85 help
@@ -71,18 +99,16 @@ config FUNCTION_GRAPH_TRACER
71 help 99 help
72 Enable the kernel to trace a function at both its return 100 Enable the kernel to trace a function at both its return
73 and its entry. 101 and its entry.
74 It's first purpose is to trace the duration of functions and 102 Its first purpose is to trace the duration of functions and
75 draw a call graph for each thread with some informations like 103 draw a call graph for each thread with some information like
76 the return value. 104 the return value. This is done by setting the current return
77 This is done by setting the current return address on the current 105 address on the current task structure into a stack of calls.
78 task structure into a stack of calls.
79 106
80config IRQSOFF_TRACER 107config IRQSOFF_TRACER
81 bool "Interrupts-off Latency Tracer" 108 bool "Interrupts-off Latency Tracer"
82 default n 109 default n
83 depends on TRACE_IRQFLAGS_SUPPORT 110 depends on TRACE_IRQFLAGS_SUPPORT
84 depends on GENERIC_TIME 111 depends on GENERIC_TIME
85 depends on DEBUG_KERNEL
86 select TRACE_IRQFLAGS 112 select TRACE_IRQFLAGS
87 select TRACING 113 select TRACING
88 select TRACER_MAX_TRACE 114 select TRACER_MAX_TRACE
@@ -105,7 +131,6 @@ config PREEMPT_TRACER
105 default n 131 default n
106 depends on GENERIC_TIME 132 depends on GENERIC_TIME
107 depends on PREEMPT 133 depends on PREEMPT
108 depends on DEBUG_KERNEL
109 select TRACING 134 select TRACING
110 select TRACER_MAX_TRACE 135 select TRACER_MAX_TRACE
111 help 136 help
@@ -126,13 +151,13 @@ config SYSPROF_TRACER
126 bool "Sysprof Tracer" 151 bool "Sysprof Tracer"
127 depends on X86 152 depends on X86
128 select TRACING 153 select TRACING
154 select CONTEXT_SWITCH_TRACER
129 help 155 help
130 This tracer provides the trace needed by the 'Sysprof' userspace 156 This tracer provides the trace needed by the 'Sysprof' userspace
131 tool. 157 tool.
132 158
133config SCHED_TRACER 159config SCHED_TRACER
134 bool "Scheduling Latency Tracer" 160 bool "Scheduling Latency Tracer"
135 depends on DEBUG_KERNEL
136 select TRACING 161 select TRACING
137 select CONTEXT_SWITCH_TRACER 162 select CONTEXT_SWITCH_TRACER
138 select TRACER_MAX_TRACE 163 select TRACER_MAX_TRACE
@@ -142,16 +167,30 @@ config SCHED_TRACER
142 167
143config CONTEXT_SWITCH_TRACER 168config CONTEXT_SWITCH_TRACER
144 bool "Trace process context switches" 169 bool "Trace process context switches"
145 depends on DEBUG_KERNEL
146 select TRACING 170 select TRACING
147 select MARKERS 171 select MARKERS
148 help 172 help
149 This tracer gets called from the context switch and records 173 This tracer gets called from the context switch and records
150 all switching of tasks. 174 all switching of tasks.
151 175
176config EVENT_TRACER
177 bool "Trace various events in the kernel"
178 select TRACING
179 help
180 This tracer hooks to various trace points in the kernel
181 allowing the user to pick and choose which trace point they
182 want to trace.
183
184config FTRACE_SYSCALLS
185 bool "Trace syscalls"
186 depends on HAVE_FTRACE_SYSCALLS
187 select TRACING
188 select KALLSYMS
189 help
190 Basic tracer to catch the syscall entry and exit events.
191
152config BOOT_TRACER 192config BOOT_TRACER
153 bool "Trace boot initcalls" 193 bool "Trace boot initcalls"
154 depends on DEBUG_KERNEL
155 select TRACING 194 select TRACING
156 select CONTEXT_SWITCH_TRACER 195 select CONTEXT_SWITCH_TRACER
157 help 196 help
@@ -164,13 +203,11 @@ config BOOT_TRACER
164 representation of the delays during initcalls - but the raw 203 representation of the delays during initcalls - but the raw
165 /debug/tracing/trace text output is readable too. 204 /debug/tracing/trace text output is readable too.
166 205
167 ( Note that tracing self tests can't be enabled if this tracer is 206 You must pass in ftrace=initcall to the kernel command line
168 selected, because the self-tests are an initcall as well and that 207 to enable this on bootup.
169 would invalidate the boot trace. )
170 208
171config TRACE_BRANCH_PROFILING 209config TRACE_BRANCH_PROFILING
172 bool "Trace likely/unlikely profiler" 210 bool "Trace likely/unlikely profiler"
173 depends on DEBUG_KERNEL
174 select TRACING 211 select TRACING
175 help 212 help
176 This tracer profiles all the the likely and unlikely macros 213 This tracer profiles all the the likely and unlikely macros
@@ -223,7 +260,6 @@ config BRANCH_TRACER
223 260
224config POWER_TRACER 261config POWER_TRACER
225 bool "Trace power consumption behavior" 262 bool "Trace power consumption behavior"
226 depends on DEBUG_KERNEL
227 depends on X86 263 depends on X86
228 select TRACING 264 select TRACING
229 help 265 help
@@ -235,9 +271,9 @@ config POWER_TRACER
235config STACK_TRACER 271config STACK_TRACER
236 bool "Trace max stack" 272 bool "Trace max stack"
237 depends on HAVE_FUNCTION_TRACER 273 depends on HAVE_FUNCTION_TRACER
238 depends on DEBUG_KERNEL
239 select FUNCTION_TRACER 274 select FUNCTION_TRACER
240 select STACKTRACE 275 select STACKTRACE
276 select KALLSYMS
241 help 277 help
242 This special tracer records the maximum stack footprint of the 278 This special tracer records the maximum stack footprint of the
243 kernel and displays it in debugfs/tracing/stack_trace. 279 kernel and displays it in debugfs/tracing/stack_trace.
@@ -264,11 +300,66 @@ config HW_BRANCH_TRACER
264 This tracer records all branches on the system in a circular 300 This tracer records all branches on the system in a circular
265 buffer giving access to the last N branches for each cpu. 301 buffer giving access to the last N branches for each cpu.
266 302
303config KMEMTRACE
304 bool "Trace SLAB allocations"
305 select TRACING
306 help
307 kmemtrace provides tracing for slab allocator functions, such as
308 kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected
309 data is then fed to the userspace application in order to analyse
310 allocation hotspots, internal fragmentation and so on, making it
311 possible to see how well an allocator performs, as well as debug
312 and profile kernel code.
313
314 This requires an userspace application to use. See
315 Documentation/vm/kmemtrace.txt for more information.
316
317 Saying Y will make the kernel somewhat larger and slower. However,
318 if you disable kmemtrace at run-time or boot-time, the performance
319 impact is minimal (depending on the arch the kernel is built for).
320
321 If unsure, say N.
322
323config WORKQUEUE_TRACER
324 bool "Trace workqueues"
325 select TRACING
326 help
327 The workqueue tracer provides some statistical informations
328 about each cpu workqueue thread such as the number of the
329 works inserted and executed since their creation. It can help
330 to evaluate the amount of work each of them have to perform.
331 For example it can help a developer to decide whether he should
332 choose a per cpu workqueue instead of a singlethreaded one.
333
334config BLK_DEV_IO_TRACE
335 bool "Support for tracing block io actions"
336 depends on SYSFS
337 depends on BLOCK
338 select RELAY
339 select DEBUG_FS
340 select TRACEPOINTS
341 select TRACING
342 select STACKTRACE
343 help
344 Say Y here if you want to be able to trace the block layer actions
345 on a given queue. Tracing allows you to see any traffic happening
346 on a block device queue. For more information (and the userspace
347 support tools needed), fetch the blktrace tools from:
348
349 git://git.kernel.dk/blktrace.git
350
351 Tracing also is possible using the ftrace interface, e.g.:
352
353 echo 1 > /sys/block/sda/sda1/trace/enable
354 echo blk > /sys/kernel/debug/tracing/current_tracer
355 cat /sys/kernel/debug/tracing/trace_pipe
356
357 If unsure, say N.
358
267config DYNAMIC_FTRACE 359config DYNAMIC_FTRACE
268 bool "enable/disable ftrace tracepoints dynamically" 360 bool "enable/disable ftrace tracepoints dynamically"
269 depends on FUNCTION_TRACER 361 depends on FUNCTION_TRACER
270 depends on HAVE_DYNAMIC_FTRACE 362 depends on HAVE_DYNAMIC_FTRACE
271 depends on DEBUG_KERNEL
272 default y 363 default y
273 help 364 help
274 This option will modify all the calls to ftrace dynamically 365 This option will modify all the calls to ftrace dynamically
@@ -294,7 +385,7 @@ config FTRACE_SELFTEST
294 385
295config FTRACE_STARTUP_TEST 386config FTRACE_STARTUP_TEST
296 bool "Perform a startup test on ftrace" 387 bool "Perform a startup test on ftrace"
297 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER 388 depends on TRACING
298 select FTRACE_SELFTEST 389 select FTRACE_SELFTEST
299 help 390 help
300 This option performs a series of startup tests on ftrace. On bootup 391 This option performs a series of startup tests on ftrace. On bootup
@@ -302,4 +393,30 @@ config FTRACE_STARTUP_TEST
302 functioning properly. It will do tests on all the configured 393 functioning properly. It will do tests on all the configured
303 tracers of ftrace. 394 tracers of ftrace.
304 395
396config MMIOTRACE
397 bool "Memory mapped IO tracing"
398 depends on HAVE_MMIOTRACE_SUPPORT && PCI
399 select TRACING
400 help
401 Mmiotrace traces Memory Mapped I/O access and is meant for
402 debugging and reverse engineering. It is called from the ioremap
403 implementation and works via page faults. Tracing is disabled by
404 default and can be enabled at run-time.
405
406 See Documentation/tracers/mmiotrace.txt.
407 If you are not helping to develop drivers, say N.
408
409config MMIOTRACE_TEST
410 tristate "Test module for mmiotrace"
411 depends on MMIOTRACE && m
412 help
413 This is a dumb module for testing mmiotrace. It is very dangerous
414 as it will write garbage to IO memory starting at a given address.
415 However, it should be safe to use on e.g. unused portion of VRAM.
416
417 Say N, unless you absolutely know what you are doing.
418
305endmenu 419endmenu
420
421endif # TRACING_SUPPORT
422