Merge branches 'tracing/fastboot', 'tracing/function-return-tracer' and 'tracing...
[deliverable/linux.git] / kernel / trace / Kconfig
CommitLineData
16444a8a 1#
606576ce
SR
2# Architectures that offer an FUNCTION_TRACER implementation should
3# select HAVE_FUNCTION_TRACER:
16444a8a 4#
2a3a4f66
FW
5
6config NOP_TRACER
7 bool
8
606576ce 9config HAVE_FUNCTION_TRACER
16444a8a 10 bool
bc0c38d1 11
15e6cb36
FW
12config HAVE_FUNCTION_RET_TRACER
13 bool
14
60a7ecf4
SR
15config HAVE_FUNCTION_TRACE_MCOUNT_TEST
16 bool
17 help
18 This gets selected when the arch tests the function_trace_stop
19 variable at the mcount call site. Otherwise, this variable
20 is tested by the called function.
21
677aa9f7
SR
22config HAVE_DYNAMIC_FTRACE
23 bool
24
8da3821b
SR
25config HAVE_FTRACE_MCOUNT_RECORD
26 bool
27
352ad25a
SR
28config TRACER_MAX_TRACE
29 bool
30
7a8e76a3
SR
31config RING_BUFFER
32 bool
33
bc0c38d1
SR
34config TRACING
35 bool
36 select DEBUG_FS
7a8e76a3 37 select RING_BUFFER
c2c80529 38 select STACKTRACE if STACKTRACE_SUPPORT
5f87f112 39 select TRACEPOINTS
f3384b28 40 select NOP_TRACER
bc0c38d1 41
17d80fd0
PZ
42menu "Tracers"
43
606576ce 44config FUNCTION_TRACER
1b29b018 45 bool "Kernel Function Tracer"
606576ce 46 depends on HAVE_FUNCTION_TRACER
d3ee6d99 47 depends on DEBUG_KERNEL
1b29b018
SR
48 select FRAME_POINTER
49 select TRACING
35e8e302 50 select CONTEXT_SWITCH_TRACER
1b29b018
SR
51 help
52 Enable the kernel to trace every kernel function. This is done
53 by using a compiler feature to insert a small, 5-byte No-Operation
54 instruction to the beginning of every kernel function, which NOP
55 sequence is then dynamically patched into a tracer call when
56 tracing is enabled by the administrator. If it's runtime disabled
57 (the bootup default), then the overhead of the instructions is very
58 small and not measurable even in micro-benchmarks.
35e8e302 59
15e6cb36
FW
60config FUNCTION_RET_TRACER
61 bool "Kernel Function return Tracer"
62 depends on !DYNAMIC_FTRACE
63 depends on HAVE_FUNCTION_RET_TRACER
64 depends on FUNCTION_TRACER
65 help
66 Enable the kernel to trace a function at its return.
67 It's first purpose is to trace the duration of functions.
68 This is done by setting the current return address on the thread
69 info structure of the current task.
70
81d68a96
SR
71config IRQSOFF_TRACER
72 bool "Interrupts-off Latency Tracer"
73 default n
74 depends on TRACE_IRQFLAGS_SUPPORT
75 depends on GENERIC_TIME
d3ee6d99 76 depends on DEBUG_KERNEL
81d68a96
SR
77 select TRACE_IRQFLAGS
78 select TRACING
79 select TRACER_MAX_TRACE
80 help
81 This option measures the time spent in irqs-off critical
82 sections, with microsecond accuracy.
83
84 The default measurement method is a maximum search, which is
85 disabled by default and can be runtime (re-)started
86 via:
87
88 echo 0 > /debugfs/tracing/tracing_max_latency
89
6cd8a4bb
SR
90 (Note that kernel size and overhead increases with this option
91 enabled. This option and the preempt-off timing option can be
92 used together or separately.)
93
94config PREEMPT_TRACER
95 bool "Preemption-off Latency Tracer"
96 default n
97 depends on GENERIC_TIME
98 depends on PREEMPT
d3ee6d99 99 depends on DEBUG_KERNEL
6cd8a4bb
SR
100 select TRACING
101 select TRACER_MAX_TRACE
102 help
103 This option measures the time spent in preemption off critical
104 sections, with microsecond accuracy.
105
106 The default measurement method is a maximum search, which is
107 disabled by default and can be runtime (re-)started
108 via:
109
110 echo 0 > /debugfs/tracing/tracing_max_latency
111
112 (Note that kernel size and overhead increases with this option
113 enabled. This option and the irqs-off timing option can be
114 used together or separately.)
115
f06c3810
IM
116config SYSPROF_TRACER
117 bool "Sysprof Tracer"
4d2df795 118 depends on X86
f06c3810
IM
119 select TRACING
120 help
121 This tracer provides the trace needed by the 'Sysprof' userspace
122 tool.
123
352ad25a
SR
124config SCHED_TRACER
125 bool "Scheduling Latency Tracer"
d3ee6d99 126 depends on DEBUG_KERNEL
352ad25a
SR
127 select TRACING
128 select CONTEXT_SWITCH_TRACER
129 select TRACER_MAX_TRACE
130 help
131 This tracer tracks the latency of the highest priority task
132 to be scheduled in, starting from the point it has woken up.
133
35e8e302
SR
134config CONTEXT_SWITCH_TRACER
135 bool "Trace process context switches"
d3ee6d99 136 depends on DEBUG_KERNEL
35e8e302
SR
137 select TRACING
138 select MARKERS
139 help
140 This tracer gets called from the context switch and records
141 all switching of tasks.
142
1f5c2abb
FW
143config BOOT_TRACER
144 bool "Trace boot initcalls"
1f5c2abb
FW
145 depends on DEBUG_KERNEL
146 select TRACING
ea31e72d 147 select CONTEXT_SWITCH_TRACER
1f5c2abb
FW
148 help
149 This tracer helps developers to optimize boot times: it records
98d9c66a
IM
150 the timings of the initcalls and traces key events and the identity
151 of tasks that can cause boot delays, such as context-switches.
152
153 Its aim is to be parsed by the /scripts/bootgraph.pl tool to
154 produce pretty graphics about boot inefficiencies, giving a visual
155 representation of the delays during initcalls - but the raw
156 /debug/tracing/trace text output is readable too.
157
158 ( Note that tracing self tests can't be enabled if this tracer is
159 selected, because the self-tests are an initcall as well and that
160 would invalidate the boot trace. )
1f5c2abb 161
e5a81b62
SR
162config STACK_TRACER
163 bool "Trace max stack"
606576ce 164 depends on HAVE_FUNCTION_TRACER
2ff01c6a 165 depends on DEBUG_KERNEL
606576ce 166 select FUNCTION_TRACER
e5a81b62
SR
167 select STACKTRACE
168 help
4519d9e5
IM
169 This special tracer records the maximum stack footprint of the
170 kernel and displays it in debugfs/tracing/stack_trace.
171
172 This tracer works by hooking into every function call that the
173 kernel executes, and keeping a maximum stack depth value and
174 stack-trace saved. Because this logic has to execute in every
175 kernel function, all the time, this option can slow down the
176 kernel measurably and is generally intended for kernel
177 developers only.
178
179 Say N if unsure.
e5a81b62 180
3d083395
SR
181config DYNAMIC_FTRACE
182 bool "enable/disable ftrace tracepoints dynamically"
606576ce 183 depends on FUNCTION_TRACER
677aa9f7 184 depends on HAVE_DYNAMIC_FTRACE
d3ee6d99 185 depends on DEBUG_KERNEL
3d083395
SR
186 default y
187 help
188 This option will modify all the calls to ftrace dynamically
189 (will patch them out of the binary image and replaces them
190 with a No-Op instruction) as they are called. A table is
191 created to dynamically enable them again.
192
606576ce 193 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
3d083395
SR
194 has native performance as long as no tracing is active.
195
196 The changes to the code are done by a kernel thread that
197 wakes up once a second and checks to see if any ftrace calls
198 were made. If so, it runs stop_machine (stops all CPUS)
199 and modifies the code to jump over the call to ftrace.
60a11774 200
8da3821b
SR
201config FTRACE_MCOUNT_RECORD
202 def_bool y
203 depends on DYNAMIC_FTRACE
204 depends on HAVE_FTRACE_MCOUNT_RECORD
205
60a11774
SR
206config FTRACE_SELFTEST
207 bool
208
209config FTRACE_STARTUP_TEST
210 bool "Perform a startup test on ftrace"
3ce2b920 211 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
60a11774
SR
212 select FTRACE_SELFTEST
213 help
214 This option performs a series of startup tests on ftrace. On bootup
215 a series of tests are made to verify that the tracer is
216 functioning properly. It will do tests on all the configured
217 tracers of ftrace.
17d80fd0
PZ
218
219endmenu
This page took 0.072416 seconds and 5 git commands to generate.