blob: 8abcaf821bebedbd5252834ce40362365e510fc1 [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"
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
Steven Rostedt81d68a92008-05-12 21:20:42 +020071config IRQSOFF_TRACER
72 bool "Interrupts-off Latency Tracer"
73 default n
74 depends on TRACE_IRQFLAGS_SUPPORT
75 depends on GENERIC_TIME
Ingo Molnard3ee6d92008-09-04 14:04:51 +020076 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020077 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
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020090 (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
Ingo Molnard3ee6d92008-09-04 14:04:51 +020099 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +0200100 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
Ingo Molnarf06c3812008-05-12 21:20:47 +0200116config SYSPROF_TRACER
117 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +0200118 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +0200119 select TRACING
120 help
121 This tracer provides the trace needed by the 'Sysprof' userspace
122 tool.
123
Steven Rostedt352ad252008-05-12 21:20:42 +0200124config SCHED_TRACER
125 bool "Scheduling Latency Tracer"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200126 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +0200127 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
Steven Rostedt35e8e302008-05-12 21:20:42 +0200134config CONTEXT_SWITCH_TRACER
135 bool "Trace process context switches"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200136 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200137 select TRACING
138 select MARKERS
139 help
140 This tracer gets called from the context switch and records
141 all switching of tasks.
142
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100143config BOOT_TRACER
144 bool "Trace boot initcalls"
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100145 depends on DEBUG_KERNEL
146 select TRACING
Frederic Weisbeckerea31e722008-10-22 19:26:23 +0200147 select CONTEXT_SWITCH_TRACER
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100148 help
149 This tracer helps developers to optimize boot times: it records
Ingo Molnar98d9c662008-10-14 14:27:20 +0200150 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. )
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100161
Steven Rostedt1f0d69a2008-11-12 00:14:39 -0500162config TRACE_UNLIKELY_PROFILE
163 bool "Trace likely/unlikely profiler"
164 depends on DEBUG_KERNEL
165 select TRACING
166 help
167 This tracer profiles all the the likely and unlikely macros
168 in the kernel. It will display the results in:
169
170 /debugfs/tracing/profile_likely
171 /debugfs/tracing/profile_unlikely
172
173 Note: this will add a significant overhead, only turn this
174 on if you need to profile the system's use of these macros.
175
176 Say N if unsure.
177
Steven Rostedt52f232c2008-11-12 00:14:40 -0500178config TRACING_UNLIKELY
179 bool
180 help
181 Selected by tracers that will trace the likely and unlikely
182 conditions. This prevents the tracers themselves from being
183 profiled. Profiling the tracing infrastructure can only happen
184 when the likelys and unlikelys are not being traced.
185
186config UNLIKELY_TRACER
187 bool "Trace likely/unlikely instances"
188 depends on TRACE_UNLIKELY_PROFILE
189 select TRACING_UNLIKELY
190 help
191 This traces the events of likely and unlikely condition
192 calls in the kernel. The difference between this and the
193 "Trace likely/unlikely profiler" is that this is not a
194 histogram of the callers, but actually places the calling
195 events into a running trace buffer to see when and where the
196 events happened, as well as their results.
197
198 Say N if unsure.
199
Steven Rostedte5a81b62008-08-27 23:31:01 -0400200config STACK_TRACER
201 bool "Trace max stack"
Steven Rostedt606576c2008-10-06 19:06:12 -0400202 depends on HAVE_FUNCTION_TRACER
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200203 depends on DEBUG_KERNEL
Steven Rostedt606576c2008-10-06 19:06:12 -0400204 select FUNCTION_TRACER
Steven Rostedte5a81b62008-08-27 23:31:01 -0400205 select STACKTRACE
206 help
Ingo Molnar4519d9e2008-10-14 14:15:43 +0200207 This special tracer records the maximum stack footprint of the
208 kernel and displays it in debugfs/tracing/stack_trace.
209
210 This tracer works by hooking into every function call that the
211 kernel executes, and keeping a maximum stack depth value and
212 stack-trace saved. Because this logic has to execute in every
213 kernel function, all the time, this option can slow down the
214 kernel measurably and is generally intended for kernel
215 developers only.
216
217 Say N if unsure.
Steven Rostedte5a81b62008-08-27 23:31:01 -0400218
Steven Rostedt3d083392008-05-12 21:20:42 +0200219config DYNAMIC_FTRACE
220 bool "enable/disable ftrace tracepoints dynamically"
Steven Rostedt606576c2008-10-06 19:06:12 -0400221 depends on FUNCTION_TRACER
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400222 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200223 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200224 default y
225 help
226 This option will modify all the calls to ftrace dynamically
227 (will patch them out of the binary image and replaces them
228 with a No-Op instruction) as they are called. A table is
229 created to dynamically enable them again.
230
Steven Rostedt606576c2008-10-06 19:06:12 -0400231 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
Steven Rostedt3d083392008-05-12 21:20:42 +0200232 has native performance as long as no tracing is active.
233
234 The changes to the code are done by a kernel thread that
235 wakes up once a second and checks to see if any ftrace calls
236 were made. If so, it runs stop_machine (stops all CPUS)
237 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200238
Steven Rostedt8da38212008-08-14 15:45:07 -0400239config FTRACE_MCOUNT_RECORD
240 def_bool y
241 depends on DYNAMIC_FTRACE
242 depends on HAVE_FTRACE_MCOUNT_RECORD
243
Steven Rostedt60a11772008-05-12 21:20:44 +0200244config FTRACE_SELFTEST
245 bool
246
247config FTRACE_STARTUP_TEST
248 bool "Perform a startup test on ftrace"
Frédéric Weisbecker3ce2b922008-09-24 10:36:09 +0100249 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
Steven Rostedt60a11772008-05-12 21:20:44 +0200250 select FTRACE_SELFTEST
251 help
252 This option performs a series of startup tests on ftrace. On bootup
253 a series of tests are made to verify that the tracer is
254 functioning properly. It will do tests on all the configured
255 tracers of ftrace.
Peter Zijlstra17d80fd2008-10-21 16:31:18 +0200256
257endmenu