]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - kernel/trace/Kconfig
ftrace: add nop tracer
[linux-2.6-omap-h63xx.git] / kernel / trace / Kconfig
1 #
2 # Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
3 #
4 config HAVE_FTRACE
5         bool
6
7 config HAVE_DYNAMIC_FTRACE
8         bool
9
10 config HAVE_FTRACE_MCOUNT_RECORD
11         bool
12
13 config TRACER_MAX_TRACE
14         bool
15
16 config TRACING
17         bool
18         select DEBUG_FS
19         select STACKTRACE
20         select TRACEPOINTS
21
22 config FTRACE
23         bool "Kernel Function Tracer"
24         depends on HAVE_FTRACE
25         depends on DEBUG_KERNEL
26         select FRAME_POINTER
27         select TRACING
28         select CONTEXT_SWITCH_TRACER
29         help
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.
37
38 config IRQSOFF_TRACER
39         bool "Interrupts-off Latency Tracer"
40         default n
41         depends on TRACE_IRQFLAGS_SUPPORT
42         depends on GENERIC_TIME
43         depends on HAVE_FTRACE
44         depends on DEBUG_KERNEL
45         select TRACE_IRQFLAGS
46         select TRACING
47         select TRACER_MAX_TRACE
48         help
49           This option measures the time spent in irqs-off critical
50           sections, with microsecond accuracy.
51
52           The default measurement method is a maximum search, which is
53           disabled by default and can be runtime (re-)started
54           via:
55
56               echo 0 > /debugfs/tracing/tracing_max_latency
57
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.)
61
62 config PREEMPT_TRACER
63         bool "Preemption-off Latency Tracer"
64         default n
65         depends on GENERIC_TIME
66         depends on PREEMPT
67         depends on HAVE_FTRACE
68         depends on DEBUG_KERNEL
69         select TRACING
70         select TRACER_MAX_TRACE
71         help
72           This option measures the time spent in preemption off critical
73           sections, with microsecond accuracy.
74
75           The default measurement method is a maximum search, which is
76           disabled by default and can be runtime (re-)started
77           via:
78
79               echo 0 > /debugfs/tracing/tracing_max_latency
80
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.)
84
85 config SYSPROF_TRACER
86         bool "Sysprof Tracer"
87         depends on X86
88         select TRACING
89         help
90           This tracer provides the trace needed by the 'Sysprof' userspace
91           tool.
92
93 config SCHED_TRACER
94         bool "Scheduling Latency Tracer"
95         depends on HAVE_FTRACE
96         depends on DEBUG_KERNEL
97         select TRACING
98         select CONTEXT_SWITCH_TRACER
99         select TRACER_MAX_TRACE
100         help
101           This tracer tracks the latency of the highest priority task
102           to be scheduled in, starting from the point it has woken up.
103
104 config NOP_TRACER
105         bool "NOP Tracer"
106         depends on HAVE_FTRACE
107         depends on DEBUG_KERNEL
108         select TRACING
109         help
110           This tracer does nothing. The primary purpose for it is to
111           politely print the output of ftrace_printk() calls without
112           the overhead of an irrelevant trace taking place.
113
114 config CONTEXT_SWITCH_TRACER
115         bool "Trace process context switches"
116         depends on HAVE_FTRACE
117         depends on DEBUG_KERNEL
118         select TRACING
119         select MARKERS
120         help
121           This tracer gets called from the context switch and records
122           all switching of tasks.
123
124 config STACK_TRACER
125         bool "Trace max stack"
126         depends on HAVE_FTRACE
127         depends on DEBUG_KERNEL
128         select FTRACE
129         select STACKTRACE
130         help
131           This tracer records the max stack of the kernel, and displays
132           it in debugfs/tracing/stack_trace
133
134 config DYNAMIC_FTRACE
135         bool "enable/disable ftrace tracepoints dynamically"
136         depends on FTRACE
137         depends on HAVE_DYNAMIC_FTRACE
138         depends on DEBUG_KERNEL
139         default y
140         help
141          This option will modify all the calls to ftrace dynamically
142          (will patch them out of the binary image and replaces them
143          with a No-Op instruction) as they are called. A table is
144          created to dynamically enable them again.
145
146          This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
147          has native performance as long as no tracing is active.
148
149          The changes to the code are done by a kernel thread that
150          wakes up once a second and checks to see if any ftrace calls
151          were made. If so, it runs stop_machine (stops all CPUS)
152          and modifies the code to jump over the call to ftrace.
153
154 config FTRACE_MCOUNT_RECORD
155         def_bool y
156         depends on DYNAMIC_FTRACE
157         depends on HAVE_FTRACE_MCOUNT_RECORD
158
159 config FTRACE_SELFTEST
160         bool
161
162 config FTRACE_STARTUP_TEST
163         bool "Perform a startup test on ftrace"
164         depends on TRACING
165         depends on DEBUG_KERNEL
166         select FTRACE_SELFTEST
167         help
168           This option performs a series of startup tests on ftrace. On bootup
169           a series of tests are made to verify that the tracer is
170           functioning properly. It will do tests on all the configured
171           tracers of ftrace.