blob: 61e8cca6ff456dece688660caee325b124dccd98 [file] [log] [blame]
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02001#
Steven Rostedt606576c2008-10-06 19:06:12 -04002# Architectures that offer an FUNCTION_TRACER implementation should
3# select HAVE_FUNCTION_TRACER:
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02004#
Frédéric Weisbecker2a3a4f62008-09-21 20:12:14 +02005
6config NOP_TRACER
7 bool
8
Steven Rostedt606576c2008-10-06 19:06:12 -04009config HAVE_FUNCTION_TRACER
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020010 bool
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020011
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010012config HAVE_FUNCTION_RET_TRACER
13 bool
14
Steven Rostedt60a7ecf2008-11-05 16:05:44 -050015config 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
Steven Rostedt677aa9f2008-05-17 00:01:36 -040022config HAVE_DYNAMIC_FTRACE
23 bool
24
Steven Rostedt8da38212008-08-14 15:45:07 -040025config HAVE_FTRACE_MCOUNT_RECORD
26 bool
27
Steven Rostedt352ad252008-05-12 21:20:42 +020028config TRACER_MAX_TRACE
29 bool
30
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040031config RING_BUFFER
32 bool
33
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020034config TRACING
35 bool
36 select DEBUG_FS
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040037 select RING_BUFFER
Al Viroc2c80522008-10-31 19:50:41 +000038 select STACKTRACE if STACKTRACE_SUPPORT
Ingo Molnar5f87f112008-07-23 14:15:22 +020039 select TRACEPOINTS
Steven Rostedtf3384b22008-10-29 11:15:57 -040040 select NOP_TRACER
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020041
Peter Zijlstra17d80fd2008-10-21 16:31:18 +020042menu "Tracers"
43
Steven Rostedt606576c2008-10-06 19:06:12 -040044config FUNCTION_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020045 bool "Kernel Function Tracer"
Steven Rostedt606576c2008-10-06 19:06:12 -040046 depends on HAVE_FUNCTION_TRACER
Ingo Molnard3ee6d92008-09-04 14:04:51 +020047 depends on DEBUG_KERNEL
Steven Rostedt1b29b012008-05-12 21:20:42 +020048 select FRAME_POINTER
49 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020050 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020051 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.
Steven Rostedt35e8e302008-05-12 21:20:42 +020059
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010060config FUNCTION_RET_TRACER
61 bool "Kernel Function return Tracer"
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010062 depends on HAVE_FUNCTION_RET_TRACER
63 depends on FUNCTION_TRACER
64 help
65 Enable the kernel to trace a function at its return.
66 It's first purpose is to trace the duration of functions.
67 This is done by setting the current return address on the thread
68 info structure of the current task.
69
Steven Rostedt81d68a92008-05-12 21:20:42 +020070config IRQSOFF_TRACER
71 bool "Interrupts-off Latency Tracer"
72 default n
73 depends on TRACE_IRQFLAGS_SUPPORT
74 depends on GENERIC_TIME
Ingo Molnard3ee6d92008-09-04 14:04:51 +020075 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020076 select TRACE_IRQFLAGS
77 select TRACING
78 select TRACER_MAX_TRACE
79 help
80 This option measures the time spent in irqs-off critical
81 sections, with microsecond accuracy.
82
83 The default measurement method is a maximum search, which is
84 disabled by default and can be runtime (re-)started
85 via:
86
87 echo 0 > /debugfs/tracing/tracing_max_latency
88
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020089 (Note that kernel size and overhead increases with this option
90 enabled. This option and the preempt-off timing option can be
91 used together or separately.)
92
93config PREEMPT_TRACER
94 bool "Preemption-off Latency Tracer"
95 default n
96 depends on GENERIC_TIME
97 depends on PREEMPT
Ingo Molnard3ee6d92008-09-04 14:04:51 +020098 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020099 select TRACING
100 select TRACER_MAX_TRACE
101 help
102 This option measures the time spent in preemption off critical
103 sections, with microsecond accuracy.
104
105 The default measurement method is a maximum search, which is
106 disabled by default and can be runtime (re-)started
107 via:
108
109 echo 0 > /debugfs/tracing/tracing_max_latency
110
111 (Note that kernel size and overhead increases with this option
112 enabled. This option and the irqs-off timing option can be
113 used together or separately.)
114
Ingo Molnarf06c3812008-05-12 21:20:47 +0200115config SYSPROF_TRACER
116 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +0200117 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +0200118 select TRACING
119 help
120 This tracer provides the trace needed by the 'Sysprof' userspace
121 tool.
122
Steven Rostedt352ad252008-05-12 21:20:42 +0200123config SCHED_TRACER
124 bool "Scheduling Latency Tracer"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200125 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +0200126 select TRACING
127 select CONTEXT_SWITCH_TRACER
128 select TRACER_MAX_TRACE
129 help
130 This tracer tracks the latency of the highest priority task
131 to be scheduled in, starting from the point it has woken up.
132
Steven Rostedt35e8e302008-05-12 21:20:42 +0200133config CONTEXT_SWITCH_TRACER
134 bool "Trace process context switches"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200135 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200136 select TRACING
137 select MARKERS
138 help
139 This tracer gets called from the context switch and records
140 all switching of tasks.
141
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100142config BOOT_TRACER
143 bool "Trace boot initcalls"
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100144 depends on DEBUG_KERNEL
145 select TRACING
Frederic Weisbeckerea31e722008-10-22 19:26:23 +0200146 select CONTEXT_SWITCH_TRACER
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100147 help
148 This tracer helps developers to optimize boot times: it records
Ingo Molnar98d9c662008-10-14 14:27:20 +0200149 the timings of the initcalls and traces key events and the identity
150 of tasks that can cause boot delays, such as context-switches.
151
152 Its aim is to be parsed by the /scripts/bootgraph.pl tool to
153 produce pretty graphics about boot inefficiencies, giving a visual
154 representation of the delays during initcalls - but the raw
155 /debug/tracing/trace text output is readable too.
156
157 ( Note that tracing self tests can't be enabled if this tracer is
158 selected, because the self-tests are an initcall as well and that
159 would invalidate the boot trace. )
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100160
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500161config TRACE_BRANCH_PROFILING
Steven Rostedt1f0d69a2008-11-12 00:14:39 -0500162 bool "Trace likely/unlikely profiler"
163 depends on DEBUG_KERNEL
164 select TRACING
165 help
166 This tracer profiles all the the likely and unlikely macros
167 in the kernel. It will display the results in:
168
Steven Rostedt45b79742008-11-21 00:40:40 -0500169 /debugfs/tracing/profile_annotated_branch
Steven Rostedt1f0d69a2008-11-12 00:14:39 -0500170
171 Note: this will add a significant overhead, only turn this
172 on if you need to profile the system's use of these macros.
173
174 Say N if unsure.
175
Steven Rostedt2bcd5212008-11-21 01:30:54 -0500176config PROFILE_ALL_BRANCHES
177 bool "Profile all if conditionals"
178 depends on TRACE_BRANCH_PROFILING
179 help
180 This tracer profiles all branch conditions. Every if ()
181 taken in the kernel is recorded whether it hit or miss.
182 The results will be displayed in:
183
184 /debugfs/tracing/profile_branch
185
186 This configuration, when enabled, will impose a great overhead
187 on the system. This should only be enabled when the system
188 is to be analyzed
189
190 Say N if unsure.
191
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500192config TRACING_BRANCHES
Steven Rostedt52f232c2008-11-12 00:14:40 -0500193 bool
194 help
195 Selected by tracers that will trace the likely and unlikely
196 conditions. This prevents the tracers themselves from being
197 profiled. Profiling the tracing infrastructure can only happen
198 when the likelys and unlikelys are not being traced.
199
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500200config BRANCH_TRACER
Steven Rostedt52f232c2008-11-12 00:14:40 -0500201 bool "Trace likely/unlikely instances"
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500202 depends on TRACE_BRANCH_PROFILING
203 select TRACING_BRANCHES
Steven Rostedt52f232c2008-11-12 00:14:40 -0500204 help
205 This traces the events of likely and unlikely condition
206 calls in the kernel. The difference between this and the
207 "Trace likely/unlikely profiler" is that this is not a
208 histogram of the callers, but actually places the calling
209 events into a running trace buffer to see when and where the
210 events happened, as well as their results.
211
212 Say N if unsure.
213
Steven Rostedte5a81b62008-08-27 23:31:01 -0400214config STACK_TRACER
215 bool "Trace max stack"
Steven Rostedt606576c2008-10-06 19:06:12 -0400216 depends on HAVE_FUNCTION_TRACER
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200217 depends on DEBUG_KERNEL
Steven Rostedt606576c2008-10-06 19:06:12 -0400218 select FUNCTION_TRACER
Steven Rostedte5a81b62008-08-27 23:31:01 -0400219 select STACKTRACE
220 help
Ingo Molnar4519d9e2008-10-14 14:15:43 +0200221 This special tracer records the maximum stack footprint of the
222 kernel and displays it in debugfs/tracing/stack_trace.
223
224 This tracer works by hooking into every function call that the
225 kernel executes, and keeping a maximum stack depth value and
226 stack-trace saved. Because this logic has to execute in every
227 kernel function, all the time, this option can slow down the
228 kernel measurably and is generally intended for kernel
229 developers only.
230
231 Say N if unsure.
Steven Rostedte5a81b62008-08-27 23:31:01 -0400232
Steven Rostedt3d083392008-05-12 21:20:42 +0200233config DYNAMIC_FTRACE
234 bool "enable/disable ftrace tracepoints dynamically"
Steven Rostedt606576c2008-10-06 19:06:12 -0400235 depends on FUNCTION_TRACER
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400236 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200237 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200238 default y
239 help
240 This option will modify all the calls to ftrace dynamically
241 (will patch them out of the binary image and replaces them
242 with a No-Op instruction) as they are called. A table is
243 created to dynamically enable them again.
244
Steven Rostedt606576c2008-10-06 19:06:12 -0400245 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
Steven Rostedt3d083392008-05-12 21:20:42 +0200246 has native performance as long as no tracing is active.
247
248 The changes to the code are done by a kernel thread that
249 wakes up once a second and checks to see if any ftrace calls
250 were made. If so, it runs stop_machine (stops all CPUS)
251 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200252
Steven Rostedt8da38212008-08-14 15:45:07 -0400253config FTRACE_MCOUNT_RECORD
254 def_bool y
255 depends on DYNAMIC_FTRACE
256 depends on HAVE_FTRACE_MCOUNT_RECORD
257
Steven Rostedt60a11772008-05-12 21:20:44 +0200258config FTRACE_SELFTEST
259 bool
260
261config FTRACE_STARTUP_TEST
262 bool "Perform a startup test on ftrace"
Frédéric Weisbecker3ce2b922008-09-24 10:36:09 +0100263 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
Steven Rostedt60a11772008-05-12 21:20:44 +0200264 select FTRACE_SELFTEST
265 help
266 This option performs a series of startup tests on ftrace. On bootup
267 a series of tests are made to verify that the tracer is
268 functioning properly. It will do tests on all the configured
269 tracers of ftrace.
Peter Zijlstra17d80fd2008-10-21 16:31:18 +0200270
271endmenu