blob: 5c2295b29f2c90504ced87871930d8950abe76ee [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 Rostedt352ad252008-05-12 21:20:42 +020010config TRACER_MAX_TRACE
11 bool
12
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020013config TRACING
14 bool
15 select DEBUG_FS
Ingo Molnar86387f72008-05-12 21:20:51 +020016 select STACKTRACE
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020017
Steven Rostedt1b29b012008-05-12 21:20:42 +020018config FTRACE
19 bool "Kernel Function Tracer"
Ingo Molnar694379e2008-05-12 21:20:54 +020020 depends on HAVE_FTRACE
Steven Rostedt1b29b012008-05-12 21:20:42 +020021 select FRAME_POINTER
22 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020023 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020024 help
25 Enable the kernel to trace every kernel function. This is done
26 by using a compiler feature to insert a small, 5-byte No-Operation
27 instruction to the beginning of every kernel function, which NOP
28 sequence is then dynamically patched into a tracer call when
29 tracing is enabled by the administrator. If it's runtime disabled
30 (the bootup default), then the overhead of the instructions is very
31 small and not measurable even in micro-benchmarks.
Steven Rostedt35e8e302008-05-12 21:20:42 +020032
Steven Rostedt81d68a92008-05-12 21:20:42 +020033config IRQSOFF_TRACER
34 bool "Interrupts-off Latency Tracer"
35 default n
36 depends on TRACE_IRQFLAGS_SUPPORT
37 depends on GENERIC_TIME
Ingo Molnarc1d23272008-05-12 21:20:55 +020038 depends on HAVE_FTRACE
Steven Rostedt81d68a92008-05-12 21:20:42 +020039 select TRACE_IRQFLAGS
40 select TRACING
41 select TRACER_MAX_TRACE
42 help
43 This option measures the time spent in irqs-off critical
44 sections, with microsecond accuracy.
45
46 The default measurement method is a maximum search, which is
47 disabled by default and can be runtime (re-)started
48 via:
49
50 echo 0 > /debugfs/tracing/tracing_max_latency
51
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020052 (Note that kernel size and overhead increases with this option
53 enabled. This option and the preempt-off timing option can be
54 used together or separately.)
55
56config PREEMPT_TRACER
57 bool "Preemption-off Latency Tracer"
58 default n
59 depends on GENERIC_TIME
60 depends on PREEMPT
Ingo Molnarc1d23272008-05-12 21:20:55 +020061 depends on HAVE_FTRACE
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020062 select TRACING
63 select TRACER_MAX_TRACE
64 help
65 This option measures the time spent in preemption off critical
66 sections, with microsecond accuracy.
67
68 The default measurement method is a maximum search, which is
69 disabled by default and can be runtime (re-)started
70 via:
71
72 echo 0 > /debugfs/tracing/tracing_max_latency
73
74 (Note that kernel size and overhead increases with this option
75 enabled. This option and the irqs-off timing option can be
76 used together or separately.)
77
Steven Rostedt352ad252008-05-12 21:20:42 +020078config SCHED_TRACER
79 bool "Scheduling Latency Tracer"
Ingo Molnarc1d23272008-05-12 21:20:55 +020080 depends on HAVE_FTRACE
Steven Rostedt352ad252008-05-12 21:20:42 +020081 select TRACING
82 select CONTEXT_SWITCH_TRACER
83 select TRACER_MAX_TRACE
84 help
85 This tracer tracks the latency of the highest priority task
86 to be scheduled in, starting from the point it has woken up.
87
Steven Rostedt35e8e302008-05-12 21:20:42 +020088config CONTEXT_SWITCH_TRACER
89 bool "Trace process context switches"
Ingo Molnarc1d23272008-05-12 21:20:55 +020090 depends on HAVE_FTRACE
Steven Rostedt35e8e302008-05-12 21:20:42 +020091 select TRACING
92 select MARKERS
93 help
94 This tracer gets called from the context switch and records
95 all switching of tasks.
96
Steven Rostedt3d083392008-05-12 21:20:42 +020097config DYNAMIC_FTRACE
98 bool "enable/disable ftrace tracepoints dynamically"
99 depends on FTRACE
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400100 depends on HAVE_DYNAMIC_FTRACE
Steven Rostedt3d083392008-05-12 21:20:42 +0200101 default y
102 help
103 This option will modify all the calls to ftrace dynamically
104 (will patch them out of the binary image and replaces them
105 with a No-Op instruction) as they are called. A table is
106 created to dynamically enable them again.
107
108 This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
109 has native performance as long as no tracing is active.
110
111 The changes to the code are done by a kernel thread that
112 wakes up once a second and checks to see if any ftrace calls
113 were made. If so, it runs stop_machine (stops all CPUS)
114 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200115
116config FTRACE_SELFTEST
117 bool
118
119config FTRACE_STARTUP_TEST
120 bool "Perform a startup test on ftrace"
121 depends on TRACING
122 select FTRACE_SELFTEST
123 help
124 This option performs a series of startup tests on ftrace. On bootup
125 a series of tests are made to verify that the tracer is
126 functioning properly. It will do tests on all the configured
127 tracers of ftrace.