2 # Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
7 config TRACER_MAX_TRACE
15 bool "Kernel Function Tracer"
16 depends on DEBUG_KERNEL && HAVE_FTRACE
19 select CONTEXT_SWITCH_TRACER
21 Enable the kernel to trace every kernel function. This is done
22 by using a compiler feature to insert a small, 5-byte No-Operation
23 instruction to the beginning of every kernel function, which NOP
24 sequence is then dynamically patched into a tracer call when
25 tracing is enabled by the administrator. If it's runtime disabled
26 (the bootup default), then the overhead of the instructions is very
27 small and not measurable even in micro-benchmarks.
30 bool "Interrupts-off Latency Tracer"
32 depends on TRACE_IRQFLAGS_SUPPORT
33 depends on GENERIC_TIME
36 select TRACER_MAX_TRACE
38 This option measures the time spent in irqs-off critical
39 sections, with microsecond accuracy.
41 The default measurement method is a maximum search, which is
42 disabled by default and can be runtime (re-)started
45 echo 0 > /debugfs/tracing/tracing_max_latency
47 (Note that kernel size and overhead increases with this option
48 enabled. This option and the preempt-off timing option can be
49 used together or separately.)
52 bool "Preemption-off Latency Tracer"
54 depends on GENERIC_TIME
57 select TRACER_MAX_TRACE
59 This option measures the time spent in preemption off critical
60 sections, with microsecond accuracy.
62 The default measurement method is a maximum search, which is
63 disabled by default and can be runtime (re-)started
66 echo 0 > /debugfs/tracing/tracing_max_latency
68 (Note that kernel size and overhead increases with this option
69 enabled. This option and the irqs-off timing option can be
70 used together or separately.)
73 bool "Scheduling Latency Tracer"
74 depends on DEBUG_KERNEL
76 select CONTEXT_SWITCH_TRACER
77 select TRACER_MAX_TRACE
79 This tracer tracks the latency of the highest priority task
80 to be scheduled in, starting from the point it has woken up.
82 config CONTEXT_SWITCH_TRACER
83 bool "Trace process context switches"
84 depends on DEBUG_KERNEL
88 This tracer gets called from the context switch and records
89 all switching of tasks.
92 bool "enable/disable ftrace tracepoints dynamically"
96 This option will modify all the calls to ftrace dynamically
97 (will patch them out of the binary image and replaces them
98 with a No-Op instruction) as they are called. A table is
99 created to dynamically enable them again.
101 This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
102 has native performance as long as no tracing is active.
104 The changes to the code are done by a kernel thread that
105 wakes up once a second and checks to see if any ftrace calls
106 were made. If so, it runs stop_machine (stops all CPUS)
107 and modifies the code to jump over the call to ftrace.
109 config FTRACE_SELFTEST
112 config FTRACE_STARTUP_TEST
113 bool "Perform a startup test on ftrace"
115 select FTRACE_SELFTEST
117 This option performs a series of startup tests on ftrace. On bootup
118 a series of tests are made to verify that the tracer is
119 functioning properly. It will do tests on all the configured