blob: 16e5bb5daaa50b6cb673370c74a65200ed726bc6 [file] [log] [blame]
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02001#
2# Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
3#
4config HAVE_FTRACE
5 bool
Steven Rostedtbc0c38d2008-05-12 21:20:42 +02006
Steven Rostedt677aa9f2008-05-17 00:01:36 -04007config HAVE_DYNAMIC_FTRACE
8 bool
9
Steven Rostedt8da38212008-08-14 15:45:07 -040010config HAVE_FTRACE_MCOUNT_RECORD
11 bool
12
Steven Rostedt352ad252008-05-12 21:20:42 +020013config TRACER_MAX_TRACE
14 bool
15
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020016config TRACING
17 bool
18 select DEBUG_FS
Ingo Molnar86387f72008-05-12 21:20:51 +020019 select STACKTRACE
Ingo Molnar5f87f112008-07-23 14:15:22 +020020 select TRACEPOINTS
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020021
Steven Rostedt1b29b012008-05-12 21:20:42 +020022config FTRACE
23 bool "Kernel Function Tracer"
Ingo Molnar694379e2008-05-12 21:20:54 +020024 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020025 depends on DEBUG_KERNEL
Steven Rostedt1b29b012008-05-12 21:20:42 +020026 select FRAME_POINTER
27 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020028 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020029 help
30 Enable the kernel to trace every kernel function. This is done
31 by using a compiler feature to insert a small, 5-byte No-Operation
32 instruction to the beginning of every kernel function, which NOP
33 sequence is then dynamically patched into a tracer call when
34 tracing is enabled by the administrator. If it's runtime disabled
35 (the bootup default), then the overhead of the instructions is very
36 small and not measurable even in micro-benchmarks.
Steven Rostedt35e8e302008-05-12 21:20:42 +020037
Steven Rostedt81d68a92008-05-12 21:20:42 +020038config IRQSOFF_TRACER
39 bool "Interrupts-off Latency Tracer"
40 default n
41 depends on TRACE_IRQFLAGS_SUPPORT
42 depends on GENERIC_TIME
Ingo Molnarc1d23272008-05-12 21:20:55 +020043 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020044 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020045 select TRACE_IRQFLAGS
46 select TRACING
47 select TRACER_MAX_TRACE
48 help
49 This option measures the time spent in irqs-off critical
50 sections, with microsecond accuracy.
51
52 The default measurement method is a maximum search, which is
53 disabled by default and can be runtime (re-)started
54 via:
55
56 echo 0 > /debugfs/tracing/tracing_max_latency
57
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020058 (Note that kernel size and overhead increases with this option
59 enabled. This option and the preempt-off timing option can be
60 used together or separately.)
61
62config PREEMPT_TRACER
63 bool "Preemption-off Latency Tracer"
64 default n
65 depends on GENERIC_TIME
66 depends on PREEMPT
Ingo Molnarc1d23272008-05-12 21:20:55 +020067 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020068 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020069 select TRACING
70 select TRACER_MAX_TRACE
71 help
72 This option measures the time spent in preemption off critical
73 sections, with microsecond accuracy.
74
75 The default measurement method is a maximum search, which is
76 disabled by default and can be runtime (re-)started
77 via:
78
79 echo 0 > /debugfs/tracing/tracing_max_latency
80
81 (Note that kernel size and overhead increases with this option
82 enabled. This option and the irqs-off timing option can be
83 used together or separately.)
84
Ingo Molnarf06c3812008-05-12 21:20:47 +020085config SYSPROF_TRACER
86 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +020087 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +020088 select TRACING
89 help
90 This tracer provides the trace needed by the 'Sysprof' userspace
91 tool.
92
Steven Rostedt352ad252008-05-12 21:20:42 +020093config SCHED_TRACER
94 bool "Scheduling Latency Tracer"
Ingo Molnarc1d23272008-05-12 21:20:55 +020095 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020096 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +020097 select TRACING
98 select CONTEXT_SWITCH_TRACER
99 select TRACER_MAX_TRACE
100 help
101 This tracer tracks the latency of the highest priority task
102 to be scheduled in, starting from the point it has woken up.
103
Steven Rostedt35e8e302008-05-12 21:20:42 +0200104config CONTEXT_SWITCH_TRACER
105 bool "Trace process context switches"
Ingo Molnarc1d23272008-05-12 21:20:55 +0200106 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200107 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200108 select TRACING
109 select MARKERS
110 help
111 This tracer gets called from the context switch and records
112 all switching of tasks.
113
Steven Rostedte5a81b62008-08-27 23:31:01 -0400114config STACK_TRACER
115 bool "Trace max stack"
116 depends on HAVE_FTRACE
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200117 depends on DEBUG_KERNEL
Steven Rostedte5a81b62008-08-27 23:31:01 -0400118 select FTRACE
119 select STACKTRACE
120 help
121 This tracer records the max stack of the kernel, and displays
122 it in debugfs/tracing/stack_trace
123
Steven Rostedt3d083392008-05-12 21:20:42 +0200124config DYNAMIC_FTRACE
125 bool "enable/disable ftrace tracepoints dynamically"
126 depends on FTRACE
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400127 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200128 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200129 default y
130 help
131 This option will modify all the calls to ftrace dynamically
132 (will patch them out of the binary image and replaces them
133 with a No-Op instruction) as they are called. A table is
134 created to dynamically enable them again.
135
136 This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
137 has native performance as long as no tracing is active.
138
139 The changes to the code are done by a kernel thread that
140 wakes up once a second and checks to see if any ftrace calls
141 were made. If so, it runs stop_machine (stops all CPUS)
142 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200143
Steven Rostedt8da38212008-08-14 15:45:07 -0400144config FTRACE_MCOUNT_RECORD
145 def_bool y
146 depends on DYNAMIC_FTRACE
147 depends on HAVE_FTRACE_MCOUNT_RECORD
148
Steven Rostedt60a11772008-05-12 21:20:44 +0200149config FTRACE_SELFTEST
150 bool
151
152config FTRACE_STARTUP_TEST
153 bool "Perform a startup test on ftrace"
154 depends on TRACING
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200155 depends on DEBUG_KERNEL
Steven Rostedt60a11772008-05-12 21:20:44 +0200156 select FTRACE_SELFTEST
157 help
158 This option performs a series of startup tests on ftrace. On bootup
159 a series of tests are made to verify that the tracer is
160 functioning properly. It will do tests on all the configured
161 tracers of ftrace.