blob: 87fc34a1bb912b2ffe2eb5dd23ccf24d1c78fb76 [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
Török Edwin8d264872008-11-23 12:39:08 +02006config USER_STACKTRACE_SUPPORT
7 bool
8
Frédéric Weisbecker2a3a4f62008-09-21 20:12:14 +02009config NOP_TRACER
10 bool
11
Steven Rostedt606576c2008-10-06 19:06:12 -040012config HAVE_FUNCTION_TRACER
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +020013 bool
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020014
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010015config HAVE_FUNCTION_RET_TRACER
16 bool
17
Steven Rostedt60a7ecf2008-11-05 16:05:44 -050018config HAVE_FUNCTION_TRACE_MCOUNT_TEST
19 bool
20 help
21 This gets selected when the arch tests the function_trace_stop
22 variable at the mcount call site. Otherwise, this variable
23 is tested by the called function.
24
Steven Rostedt677aa9f2008-05-17 00:01:36 -040025config HAVE_DYNAMIC_FTRACE
26 bool
27
Steven Rostedt8da38212008-08-14 15:45:07 -040028config HAVE_FTRACE_MCOUNT_RECORD
29 bool
30
Steven Rostedt352ad252008-05-12 21:20:42 +020031config TRACER_MAX_TRACE
32 bool
33
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040034config RING_BUFFER
35 bool
36
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020037config TRACING
38 bool
39 select DEBUG_FS
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040040 select RING_BUFFER
Al Viroc2c80522008-10-31 19:50:41 +000041 select STACKTRACE if STACKTRACE_SUPPORT
Ingo Molnar5f87f112008-07-23 14:15:22 +020042 select TRACEPOINTS
Steven Rostedtf3384b22008-10-29 11:15:57 -040043 select NOP_TRACER
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020044
Peter Zijlstra17d80fd2008-10-21 16:31:18 +020045menu "Tracers"
46
Steven Rostedt606576c2008-10-06 19:06:12 -040047config FUNCTION_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020048 bool "Kernel Function Tracer"
Steven Rostedt606576c2008-10-06 19:06:12 -040049 depends on HAVE_FUNCTION_TRACER
Ingo Molnard3ee6d92008-09-04 14:04:51 +020050 depends on DEBUG_KERNEL
Steven Rostedt1b29b012008-05-12 21:20:42 +020051 select FRAME_POINTER
52 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020053 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020054 help
55 Enable the kernel to trace every kernel function. This is done
56 by using a compiler feature to insert a small, 5-byte No-Operation
57 instruction to the beginning of every kernel function, which NOP
58 sequence is then dynamically patched into a tracer call when
59 tracing is enabled by the administrator. If it's runtime disabled
60 (the bootup default), then the overhead of the instructions is very
61 small and not measurable even in micro-benchmarks.
Steven Rostedt35e8e302008-05-12 21:20:42 +020062
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010063config FUNCTION_RET_TRACER
64 bool "Kernel Function return Tracer"
Frederic Weisbecker15e6cb32008-11-11 07:14:25 +010065 depends on HAVE_FUNCTION_RET_TRACER
66 depends on FUNCTION_TRACER
67 help
68 Enable the kernel to trace a function at its return.
69 It's first purpose is to trace the duration of functions.
70 This is done by setting the current return address on the thread
71 info structure of the current task.
72
Steven Rostedt81d68a92008-05-12 21:20:42 +020073config IRQSOFF_TRACER
74 bool "Interrupts-off Latency Tracer"
75 default n
76 depends on TRACE_IRQFLAGS_SUPPORT
77 depends on GENERIC_TIME
Ingo Molnard3ee6d92008-09-04 14:04:51 +020078 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020079 select TRACE_IRQFLAGS
80 select TRACING
81 select TRACER_MAX_TRACE
82 help
83 This option measures the time spent in irqs-off critical
84 sections, with microsecond accuracy.
85
86 The default measurement method is a maximum search, which is
87 disabled by default and can be runtime (re-)started
88 via:
89
90 echo 0 > /debugfs/tracing/tracing_max_latency
91
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020092 (Note that kernel size and overhead increases with this option
93 enabled. This option and the preempt-off timing option can be
94 used together or separately.)
95
96config PREEMPT_TRACER
97 bool "Preemption-off Latency Tracer"
98 default n
99 depends on GENERIC_TIME
100 depends on PREEMPT
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200101 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +0200102 select TRACING
103 select TRACER_MAX_TRACE
104 help
105 This option measures the time spent in preemption off critical
106 sections, with microsecond accuracy.
107
108 The default measurement method is a maximum search, which is
109 disabled by default and can be runtime (re-)started
110 via:
111
112 echo 0 > /debugfs/tracing/tracing_max_latency
113
114 (Note that kernel size and overhead increases with this option
115 enabled. This option and the irqs-off timing option can be
116 used together or separately.)
117
Ingo Molnarf06c3812008-05-12 21:20:47 +0200118config SYSPROF_TRACER
119 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +0200120 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +0200121 select TRACING
122 help
123 This tracer provides the trace needed by the 'Sysprof' userspace
124 tool.
125
Steven Rostedt352ad252008-05-12 21:20:42 +0200126config SCHED_TRACER
127 bool "Scheduling Latency Tracer"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200128 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +0200129 select TRACING
130 select CONTEXT_SWITCH_TRACER
131 select TRACER_MAX_TRACE
132 help
133 This tracer tracks the latency of the highest priority task
134 to be scheduled in, starting from the point it has woken up.
135
Steven Rostedt35e8e302008-05-12 21:20:42 +0200136config CONTEXT_SWITCH_TRACER
137 bool "Trace process context switches"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200138 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200139 select TRACING
140 select MARKERS
141 help
142 This tracer gets called from the context switch and records
143 all switching of tasks.
144
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100145config BOOT_TRACER
146 bool "Trace boot initcalls"
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100147 depends on DEBUG_KERNEL
148 select TRACING
Frederic Weisbeckerea31e722008-10-22 19:26:23 +0200149 select CONTEXT_SWITCH_TRACER
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100150 help
151 This tracer helps developers to optimize boot times: it records
Ingo Molnar98d9c662008-10-14 14:27:20 +0200152 the timings of the initcalls and traces key events and the identity
153 of tasks that can cause boot delays, such as context-switches.
154
155 Its aim is to be parsed by the /scripts/bootgraph.pl tool to
156 produce pretty graphics about boot inefficiencies, giving a visual
157 representation of the delays during initcalls - but the raw
158 /debug/tracing/trace text output is readable too.
159
160 ( Note that tracing self tests can't be enabled if this tracer is
161 selected, because the self-tests are an initcall as well and that
162 would invalidate the boot trace. )
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100163
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500164config TRACE_BRANCH_PROFILING
Steven Rostedt1f0d69a2008-11-12 00:14:39 -0500165 bool "Trace likely/unlikely profiler"
166 depends on DEBUG_KERNEL
167 select TRACING
168 help
169 This tracer profiles all the the likely and unlikely macros
170 in the kernel. It will display the results in:
171
172 /debugfs/tracing/profile_likely
173 /debugfs/tracing/profile_unlikely
174
175 Note: this will add a significant overhead, only turn this
176 on if you need to profile the system's use of these macros.
177
178 Say N if unsure.
179
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500180config TRACING_BRANCHES
Steven Rostedt52f232c2008-11-12 00:14:40 -0500181 bool
182 help
183 Selected by tracers that will trace the likely and unlikely
184 conditions. This prevents the tracers themselves from being
185 profiled. Profiling the tracing infrastructure can only happen
186 when the likelys and unlikelys are not being traced.
187
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500188config BRANCH_TRACER
Steven Rostedt52f232c2008-11-12 00:14:40 -0500189 bool "Trace likely/unlikely instances"
Steven Rostedt2ed84ee2008-11-12 15:24:24 -0500190 depends on TRACE_BRANCH_PROFILING
191 select TRACING_BRANCHES
Steven Rostedt52f232c2008-11-12 00:14:40 -0500192 help
193 This traces the events of likely and unlikely condition
194 calls in the kernel. The difference between this and the
195 "Trace likely/unlikely profiler" is that this is not a
196 histogram of the callers, but actually places the calling
197 events into a running trace buffer to see when and where the
198 events happened, as well as their results.
199
200 Say N if unsure.
201
Steven Rostedte5a81b62008-08-27 23:31:01 -0400202config STACK_TRACER
203 bool "Trace max stack"
Steven Rostedt606576c2008-10-06 19:06:12 -0400204 depends on HAVE_FUNCTION_TRACER
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200205 depends on DEBUG_KERNEL
Steven Rostedt606576c2008-10-06 19:06:12 -0400206 select FUNCTION_TRACER
Steven Rostedte5a81b62008-08-27 23:31:01 -0400207 select STACKTRACE
208 help
Ingo Molnar4519d9e2008-10-14 14:15:43 +0200209 This special tracer records the maximum stack footprint of the
210 kernel and displays it in debugfs/tracing/stack_trace.
211
212 This tracer works by hooking into every function call that the
213 kernel executes, and keeping a maximum stack depth value and
214 stack-trace saved. Because this logic has to execute in every
215 kernel function, all the time, this option can slow down the
216 kernel measurably and is generally intended for kernel
217 developers only.
218
219 Say N if unsure.
Steven Rostedte5a81b62008-08-27 23:31:01 -0400220
Steven Rostedt3d083392008-05-12 21:20:42 +0200221config DYNAMIC_FTRACE
222 bool "enable/disable ftrace tracepoints dynamically"
Steven Rostedt606576c2008-10-06 19:06:12 -0400223 depends on FUNCTION_TRACER
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400224 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200225 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200226 default y
227 help
228 This option will modify all the calls to ftrace dynamically
229 (will patch them out of the binary image and replaces them
230 with a No-Op instruction) as they are called. A table is
231 created to dynamically enable them again.
232
Steven Rostedt606576c2008-10-06 19:06:12 -0400233 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
Steven Rostedt3d083392008-05-12 21:20:42 +0200234 has native performance as long as no tracing is active.
235
236 The changes to the code are done by a kernel thread that
237 wakes up once a second and checks to see if any ftrace calls
238 were made. If so, it runs stop_machine (stops all CPUS)
239 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200240
Steven Rostedt8da38212008-08-14 15:45:07 -0400241config FTRACE_MCOUNT_RECORD
242 def_bool y
243 depends on DYNAMIC_FTRACE
244 depends on HAVE_FTRACE_MCOUNT_RECORD
245
Steven Rostedt60a11772008-05-12 21:20:44 +0200246config FTRACE_SELFTEST
247 bool
248
249config FTRACE_STARTUP_TEST
250 bool "Perform a startup test on ftrace"
Frédéric Weisbecker3ce2b922008-09-24 10:36:09 +0100251 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
Steven Rostedt60a11772008-05-12 21:20:44 +0200252 select FTRACE_SELFTEST
253 help
254 This option performs a series of startup tests on ftrace. On bootup
255 a series of tests are made to verify that the tracer is
256 functioning properly. It will do tests on all the configured
257 tracers of ftrace.
Peter Zijlstra17d80fd2008-10-21 16:31:18 +0200258
259endmenu