blob: 254328dec672f2b1f99eeac0f1cc190cbdf6117f [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#
Frédéric Weisbecker2a3a4f62008-09-21 20:12:14 +02004
5config NOP_TRACER
6 bool
7
Arnaldo Carvalho de Melo16444a82008-05-12 21:20:42 +02008config HAVE_FTRACE
9 bool
Frédéric Weisbecker2a3a4f62008-09-21 20:12:14 +020010 select NOP_TRACER
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020011
Steven Rostedt677aa9f2008-05-17 00:01:36 -040012config HAVE_DYNAMIC_FTRACE
13 bool
14
Steven Rostedt8da38212008-08-14 15:45:07 -040015config HAVE_FTRACE_MCOUNT_RECORD
16 bool
17
Steven Rostedt352ad252008-05-12 21:20:42 +020018config TRACER_MAX_TRACE
19 bool
20
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020021config TRACING
22 bool
23 select DEBUG_FS
Ingo Molnar86387f72008-05-12 21:20:51 +020024 select STACKTRACE
Ingo Molnar5f87f112008-07-23 14:15:22 +020025 select TRACEPOINTS
Steven Rostedtbc0c38d2008-05-12 21:20:42 +020026
Steven Rostedt1b29b012008-05-12 21:20:42 +020027config FTRACE
28 bool "Kernel Function Tracer"
Ingo Molnar694379e2008-05-12 21:20:54 +020029 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020030 depends on DEBUG_KERNEL
Steven Rostedt1b29b012008-05-12 21:20:42 +020031 select FRAME_POINTER
32 select TRACING
Steven Rostedt35e8e302008-05-12 21:20:42 +020033 select CONTEXT_SWITCH_TRACER
Steven Rostedt1b29b012008-05-12 21:20:42 +020034 help
35 Enable the kernel to trace every kernel function. This is done
36 by using a compiler feature to insert a small, 5-byte No-Operation
37 instruction to the beginning of every kernel function, which NOP
38 sequence is then dynamically patched into a tracer call when
39 tracing is enabled by the administrator. If it's runtime disabled
40 (the bootup default), then the overhead of the instructions is very
41 small and not measurable even in micro-benchmarks.
Steven Rostedt35e8e302008-05-12 21:20:42 +020042
Steven Rostedt81d68a92008-05-12 21:20:42 +020043config IRQSOFF_TRACER
44 bool "Interrupts-off Latency Tracer"
45 default n
46 depends on TRACE_IRQFLAGS_SUPPORT
47 depends on GENERIC_TIME
Ingo Molnarc1d23272008-05-12 21:20:55 +020048 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020049 depends on DEBUG_KERNEL
Steven Rostedt81d68a92008-05-12 21:20:42 +020050 select TRACE_IRQFLAGS
51 select TRACING
52 select TRACER_MAX_TRACE
53 help
54 This option measures the time spent in irqs-off critical
55 sections, with microsecond accuracy.
56
57 The default measurement method is a maximum search, which is
58 disabled by default and can be runtime (re-)started
59 via:
60
61 echo 0 > /debugfs/tracing/tracing_max_latency
62
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020063 (Note that kernel size and overhead increases with this option
64 enabled. This option and the preempt-off timing option can be
65 used together or separately.)
66
67config PREEMPT_TRACER
68 bool "Preemption-off Latency Tracer"
69 default n
70 depends on GENERIC_TIME
71 depends on PREEMPT
Ingo Molnarc1d23272008-05-12 21:20:55 +020072 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +020073 depends on DEBUG_KERNEL
Steven Rostedt6cd8a4b2008-05-12 21:20:42 +020074 select TRACING
75 select TRACER_MAX_TRACE
76 help
77 This option measures the time spent in preemption off critical
78 sections, with microsecond accuracy.
79
80 The default measurement method is a maximum search, which is
81 disabled by default and can be runtime (re-)started
82 via:
83
84 echo 0 > /debugfs/tracing/tracing_max_latency
85
86 (Note that kernel size and overhead increases with this option
87 enabled. This option and the irqs-off timing option can be
88 used together or separately.)
89
Ingo Molnarf06c3812008-05-12 21:20:47 +020090config SYSPROF_TRACER
91 bool "Sysprof Tracer"
Thomas Gleixner4d2df792008-05-24 15:00:46 +020092 depends on X86
Ingo Molnarf06c3812008-05-12 21:20:47 +020093 select TRACING
94 help
95 This tracer provides the trace needed by the 'Sysprof' userspace
96 tool.
97
Steven Rostedt352ad252008-05-12 21:20:42 +020098config SCHED_TRACER
99 bool "Scheduling Latency Tracer"
Ingo Molnarc1d23272008-05-12 21:20:55 +0200100 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200101 depends on DEBUG_KERNEL
Steven Rostedt352ad252008-05-12 21:20:42 +0200102 select TRACING
103 select CONTEXT_SWITCH_TRACER
104 select TRACER_MAX_TRACE
105 help
106 This tracer tracks the latency of the highest priority task
107 to be scheduled in, starting from the point it has woken up.
108
Steven Rostedt35e8e302008-05-12 21:20:42 +0200109config CONTEXT_SWITCH_TRACER
110 bool "Trace process context switches"
Ingo Molnarc1d23272008-05-12 21:20:55 +0200111 depends on HAVE_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200112 depends on DEBUG_KERNEL
Steven Rostedt35e8e302008-05-12 21:20:42 +0200113 select TRACING
114 select MARKERS
115 help
116 This tracer gets called from the context switch and records
117 all switching of tasks.
118
Steven Rostedte5a81b62008-08-27 23:31:01 -0400119config STACK_TRACER
120 bool "Trace max stack"
121 depends on HAVE_FTRACE
Ingo Molnar2ff01c62008-09-04 15:04:37 +0200122 depends on DEBUG_KERNEL
Steven Rostedte5a81b62008-08-27 23:31:01 -0400123 select FTRACE
124 select STACKTRACE
125 help
126 This tracer records the max stack of the kernel, and displays
127 it in debugfs/tracing/stack_trace
128
Steven Rostedt3d083392008-05-12 21:20:42 +0200129config DYNAMIC_FTRACE
130 bool "enable/disable ftrace tracepoints dynamically"
131 depends on FTRACE
Steven Rostedt677aa9f2008-05-17 00:01:36 -0400132 depends on HAVE_DYNAMIC_FTRACE
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200133 depends on DEBUG_KERNEL
Steven Rostedt3d083392008-05-12 21:20:42 +0200134 default y
135 help
136 This option will modify all the calls to ftrace dynamically
137 (will patch them out of the binary image and replaces them
138 with a No-Op instruction) as they are called. A table is
139 created to dynamically enable them again.
140
141 This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
142 has native performance as long as no tracing is active.
143
144 The changes to the code are done by a kernel thread that
145 wakes up once a second and checks to see if any ftrace calls
146 were made. If so, it runs stop_machine (stops all CPUS)
147 and modifies the code to jump over the call to ftrace.
Steven Rostedt60a11772008-05-12 21:20:44 +0200148
Steven Rostedt8da38212008-08-14 15:45:07 -0400149config FTRACE_MCOUNT_RECORD
150 def_bool y
151 depends on DYNAMIC_FTRACE
152 depends on HAVE_FTRACE_MCOUNT_RECORD
153
Steven Rostedt60a11772008-05-12 21:20:44 +0200154config FTRACE_SELFTEST
155 bool
156
157config FTRACE_STARTUP_TEST
158 bool "Perform a startup test on ftrace"
159 depends on TRACING
Ingo Molnard3ee6d92008-09-04 14:04:51 +0200160 depends on DEBUG_KERNEL
Steven Rostedt60a11772008-05-12 21:20:44 +0200161 select FTRACE_SELFTEST
162 help
163 This option performs a series of startup tests on ftrace. On bootup
164 a series of tests are made to verify that the tracer is
165 functioning properly. It will do tests on all the configured
166 tracers of ftrace.