blob: 3533c583df47ddb55257d56e6e42203b5dfdf0c8 [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
Frédéric Weisbecker2a3a4f62008-09-21 20:12:14 +020011 select NOP_TRACER
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020012
Steven Rostedt677aa9f2008-05-17 00:01:36 -040013config HAVE_DYNAMIC_FTRACE
14 bool
15
Steven Rostedt8da38212008-08-14 15:45:07 -040016config HAVE_FTRACE_MCOUNT_RECORD
17 bool
18
Steven Rostedt352ad252008-05-12 21:20:42 +020019config TRACER_MAX_TRACE
20 bool
21
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040022config RING_BUFFER
23 bool
24
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020025config TRACING
26 bool
27 select DEBUG_FS
Steven Rostedt7a8e76a2008-09-29 23:02:38 -040028 select RING_BUFFER
Ingo Molnar86387f72008-05-12 21:20:51 +020029 select STACKTRACE
Ingo Molnar5f87f112008-07-23 14:15:22 +020030 select TRACEPOINTS
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020031
Steven Rostedt606576c2008-10-06 19:06:12 -040032config FUNCTION_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020033 bool "Kernel Function Tracer"
Steven Rostedt606576c2008-10-06 19:06:12 -040034 depends on HAVE_FUNCTION_TRACER
Ingo Molnard3ee6d92008-09-04 14:04:51 +020035 depends on DEBUG_KERNEL
Steven Rostedt1b29b012008-05-12 21:20:42 +020036 select FRAME_POINTER
37 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020038 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020039 help
40 Enable the kernel to trace every kernel function. This is done
41 by using a compiler feature to insert a small, 5-byte No-Operation
42 instruction to the beginning of every kernel function, which NOP
43 sequence is then dynamically patched into a tracer call when
44 tracing is enabled by the administrator. If it's runtime disabled
45 (the bootup default), then the overhead of the instructions is very
46 small and not measurable even in micro-benchmarks.
Steven Rostedt35e8e302008-05-12 21:20:42 +020047
Steven Rostedt81d68a92008-05-12 21:20:42 +020048config IRQSOFF_TRACER
49 bool "Interrupts-off Latency Tracer"
50 default n
51 depends on TRACE_IRQFLAGS_SUPPORT
52 depends on GENERIC_TIME
Ingo Molnard3ee6d92008-09-04 14:04:51 +020053 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020054 select TRACE_IRQFLAGS
55 select TRACING
56 select TRACER_MAX_TRACE
57 help
58 This option measures the time spent in irqs-off critical
59 sections, with microsecond accuracy.
60
61 The default measurement method is a maximum search, which is
62 disabled by default and can be runtime (re-)started
63 via:
64
65 echo 0 > /debugfs/tracing/tracing_max_latency
66
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020067 (Note that kernel size and overhead increases with this option
68 enabled. This option and the preempt-off timing option can be
69 used together or separately.)
70
71config PREEMPT_TRACER
72 bool "Preemption-off Latency Tracer"
73 default n
74 depends on GENERIC_TIME
75 depends on PREEMPT
Ingo Molnard3ee6d92008-09-04 14:04:51 +020076 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020077 select TRACING
78 select TRACER_MAX_TRACE
79 help
80 This option measures the time spent in preemption 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
89 (Note that kernel size and overhead increases with this option
90 enabled. This option and the irqs-off timing option can be
91 used together or separately.)
92
Ingo Molnarf06c3812008-05-12 21:20:47 +020093config SYSPROF_TRACER
94 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +020095 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +020096 select TRACING
97 help
98 This tracer provides the trace needed by the 'Sysprof' userspace
99 tool.
100
Steven Rostedt352ad252008-05-12 21:20:42 +0200101config SCHED_TRACER
102 bool "Scheduling Latency Tracer"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200103 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +0200104 select TRACING
105 select CONTEXT_SWITCH_TRACER
106 select TRACER_MAX_TRACE
107 help
108 This tracer tracks the latency of the highest priority task
109 to be scheduled in, starting from the point it has woken up.
110
Steven Rostedt35e8e302008-05-12 21:20:42 +0200111config CONTEXT_SWITCH_TRACER
112 bool "Trace process context switches"
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200113 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200114 select TRACING
115 select MARKERS
116 help
117 This tracer gets called from the context switch and records
118 all switching of tasks.
119
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100120config BOOT_TRACER
121 bool "Trace boot initcalls"
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100122 depends on DEBUG_KERNEL
123 select TRACING
124 help
125 This tracer helps developers to optimize boot times: it records
Ingo Molnar98d9c662008-10-14 14:27:20 +0200126 the timings of the initcalls and traces key events and the identity
127 of tasks that can cause boot delays, such as context-switches.
128
129 Its aim is to be parsed by the /scripts/bootgraph.pl tool to
130 produce pretty graphics about boot inefficiencies, giving a visual
131 representation of the delays during initcalls - but the raw
132 /debug/tracing/trace text output is readable too.
133
134 ( Note that tracing self tests can't be enabled if this tracer is
135 selected, because the self-tests are an initcall as well and that
136 would invalidate the boot trace. )
Frédéric Weisbecker1f5c2ab2008-09-23 11:36:20 +0100137
Steven Rostedte5a81b62008-08-27 23:31:01 -0400138config STACK_TRACER
139 bool "Trace max stack"
Steven Rostedt606576c2008-10-06 19:06:12 -0400140 depends on HAVE_FUNCTION_TRACER
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200141 depends on DEBUG_KERNEL
Steven Rostedt606576c2008-10-06 19:06:12 -0400142 select FUNCTION_TRACER
Steven Rostedte5a81b62008-08-27 23:31:01 -0400143 select STACKTRACE
144 help
Ingo Molnar4519d9e2008-10-14 14:15:43 +0200145 This special tracer records the maximum stack footprint of the
146 kernel and displays it in debugfs/tracing/stack_trace.
147
148 This tracer works by hooking into every function call that the
149 kernel executes, and keeping a maximum stack depth value and
150 stack-trace saved. Because this logic has to execute in every
151 kernel function, all the time, this option can slow down the
152 kernel measurably and is generally intended for kernel
153 developers only.
154
155 Say N if unsure.
Steven Rostedte5a81b62008-08-27 23:31:01 -0400156
Steven Rostedt3d083392008-05-12 21:20:42 +0200157config DYNAMIC_FTRACE
158 bool "enable/disable ftrace tracepoints dynamically"
Steven Rostedt606576c2008-10-06 19:06:12 -0400159 depends on FUNCTION_TRACER
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400160 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200161 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200162 default y
163 help
164 This option will modify all the calls to ftrace dynamically
165 (will patch them out of the binary image and replaces them
166 with a No-Op instruction) as they are called. A table is
167 created to dynamically enable them again.
168
Steven Rostedt606576c2008-10-06 19:06:12 -0400169 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
Steven Rostedt3d083392008-05-12 21:20:42 +0200170 has native performance as long as no tracing is active.
171
172 The changes to the code are done by a kernel thread that
173 wakes up once a second and checks to see if any ftrace calls
174 were made. If so, it runs stop_machine (stops all CPUS)
175 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200176
Steven Rostedt8da38212008-08-14 15:45:07 -0400177config FTRACE_MCOUNT_RECORD
178 def_bool y
179 depends on DYNAMIC_FTRACE
180 depends on HAVE_FTRACE_MCOUNT_RECORD
181
Steven Rostedt60a11772008-05-12 21:20:44 +0200182config FTRACE_SELFTEST
183 bool
184
185config FTRACE_STARTUP_TEST
186 bool "Perform a startup test on ftrace"
Frédéric Weisbecker3ce2b922008-09-24 10:36:09 +0100187 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
Steven Rostedt60a11772008-05-12 21:20:44 +0200188 select FTRACE_SELFTEST
189 help
190 This option performs a series of startup tests on ftrace. On bootup
191 a series of tests are made to verify that the tracer is
192 functioning properly. It will do tests on all the configured
193 tracers of ftrace.