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