2 # Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
7 config HAVE_DYNAMIC_FTRACE
10 config HAVE_FTRACE_MCOUNT_RECORD
13 config TRACER_MAX_TRACE
23 bool "Kernel Function Tracer"
24 depends on HAVE_FTRACE
25 depends on DEBUG_KERNEL
28 select CONTEXT_SWITCH_TRACER
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.
39 bool "Interrupts-off Latency Tracer"
41 depends on TRACE_IRQFLAGS_SUPPORT
42 depends on GENERIC_TIME
43 depends on HAVE_FTRACE
44 depends on DEBUG_KERNEL
47 select TRACER_MAX_TRACE
49 This option measures the time spent in irqs-off critical
50 sections, with microsecond accuracy.
52 The default measurement method is a maximum search, which is
53 disabled by default and can be runtime (re-)started
56 echo 0 > /debugfs/tracing/tracing_max_latency
58 (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.)
63 bool "Preemption-off Latency Tracer"
65 depends on GENERIC_TIME
67 depends on HAVE_FTRACE
68 depends on DEBUG_KERNEL
70 select TRACER_MAX_TRACE
72 This option measures the time spent in preemption off critical
73 sections, with microsecond accuracy.
75 The default measurement method is a maximum search, which is
76 disabled by default and can be runtime (re-)started
79 echo 0 > /debugfs/tracing/tracing_max_latency
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.)
90 This tracer provides the trace needed by the 'Sysprof' userspace
94 bool "Scheduling Latency Tracer"
95 depends on HAVE_FTRACE
96 depends on DEBUG_KERNEL
98 select CONTEXT_SWITCH_TRACER
99 select TRACER_MAX_TRACE
101 This tracer tracks the latency of the highest priority task
102 to be scheduled in, starting from the point it has woken up.
104 config CONTEXT_SWITCH_TRACER
105 bool "Trace process context switches"
106 depends on HAVE_FTRACE
107 depends on DEBUG_KERNEL
111 This tracer gets called from the context switch and records
112 all switching of tasks.
115 bool "Trace max stack"
116 depends on HAVE_FTRACE
117 depends on DEBUG_KERNEL
121 This tracer records the max stack of the kernel, and displays
122 it in debugfs/tracing/stack_trace
124 config DYNAMIC_FTRACE
125 bool "enable/disable ftrace tracepoints dynamically"
127 depends on HAVE_DYNAMIC_FTRACE
128 depends on DEBUG_KERNEL
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.
136 This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
137 has native performance as long as no tracing is active.
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.
144 config FTRACE_MCOUNT_RECORD
146 depends on DYNAMIC_FTRACE
147 depends on HAVE_FTRACE_MCOUNT_RECORD
149 config FTRACE_SELFTEST
152 config FTRACE_STARTUP_TEST
153 bool "Perform a startup test on ftrace"
155 depends on DEBUG_KERNEL
156 select FTRACE_SELFTEST
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