]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - kernel/trace/Kconfig
ftrace: rename FTRACE to FUNCTION_TRACER
[mirror_ubuntu-artful-kernel.git] / kernel / trace / Kconfig
1 #
2 # Architectures that offer an FUNCTION_TRACER implementation should
3 # select HAVE_FUNCTION_TRACER:
4 #
5
6 config NOP_TRACER
7 bool
8
9 config HAVE_FUNCTION_TRACER
10 bool
11 select NOP_TRACER
12
13 config HAVE_DYNAMIC_FTRACE
14 bool
15
16 config HAVE_FTRACE_MCOUNT_RECORD
17 bool
18
19 config TRACER_MAX_TRACE
20 bool
21
22 config RING_BUFFER
23 bool
24
25 config TRACING
26 bool
27 select DEBUG_FS
28 select RING_BUFFER
29 select STACKTRACE
30 select TRACEPOINTS
31
32 config FUNCTION_TRACER
33 bool "Kernel Function Tracer"
34 depends on HAVE_FUNCTION_TRACER
35 depends on DEBUG_KERNEL
36 select FRAME_POINTER
37 select TRACING
38 select CONTEXT_SWITCH_TRACER
39 help
40 Enable the kernel to trace every kernel function. This is done
41 by using a compiler feature to insert a small, 5-byte No-Operation
42 instruction to the beginning of every kernel function, which NOP
43 sequence is then dynamically patched into a tracer call when
44 tracing is enabled by the administrator. If it's runtime disabled
45 (the bootup default), then the overhead of the instructions is very
46 small and not measurable even in micro-benchmarks.
47
48 config IRQSOFF_TRACER
49 bool "Interrupts-off Latency Tracer"
50 default n
51 depends on TRACE_IRQFLAGS_SUPPORT
52 depends on GENERIC_TIME
53 depends on DEBUG_KERNEL
54 select TRACE_IRQFLAGS
55 select TRACING
56 select TRACER_MAX_TRACE
57 help
58 This option measures the time spent in irqs-off critical
59 sections, with microsecond accuracy.
60
61 The default measurement method is a maximum search, which is
62 disabled by default and can be runtime (re-)started
63 via:
64
65 echo 0 > /debugfs/tracing/tracing_max_latency
66
67 (Note that kernel size and overhead increases with this option
68 enabled. This option and the preempt-off timing option can be
69 used together or separately.)
70
71 config PREEMPT_TRACER
72 bool "Preemption-off Latency Tracer"
73 default n
74 depends on GENERIC_TIME
75 depends on PREEMPT
76 depends on DEBUG_KERNEL
77 select TRACING
78 select TRACER_MAX_TRACE
79 help
80 This option measures the time spent in preemption off critical
81 sections, with microsecond accuracy.
82
83 The default measurement method is a maximum search, which is
84 disabled by default and can be runtime (re-)started
85 via:
86
87 echo 0 > /debugfs/tracing/tracing_max_latency
88
89 (Note that kernel size and overhead increases with this option
90 enabled. This option and the irqs-off timing option can be
91 used together or separately.)
92
93 config SYSPROF_TRACER
94 bool "Sysprof Tracer"
95 depends on X86
96 select TRACING
97 help
98 This tracer provides the trace needed by the 'Sysprof' userspace
99 tool.
100
101 config SCHED_TRACER
102 bool "Scheduling Latency Tracer"
103 depends on DEBUG_KERNEL
104 select TRACING
105 select CONTEXT_SWITCH_TRACER
106 select TRACER_MAX_TRACE
107 help
108 This tracer tracks the latency of the highest priority task
109 to be scheduled in, starting from the point it has woken up.
110
111 config CONTEXT_SWITCH_TRACER
112 bool "Trace process context switches"
113 depends on DEBUG_KERNEL
114 select TRACING
115 select MARKERS
116 help
117 This tracer gets called from the context switch and records
118 all switching of tasks.
119
120 config BOOT_TRACER
121 bool "Trace boot initcalls"
122 depends on DEBUG_KERNEL
123 select TRACING
124 help
125 This tracer helps developers to optimize boot times: it records
126 the timings of the initcalls and traces key events and the identity
127 of tasks that can cause boot delays, such as context-switches.
128
129 Its aim is to be parsed by the /scripts/bootgraph.pl tool to
130 produce pretty graphics about boot inefficiencies, giving a visual
131 representation of the delays during initcalls - but the raw
132 /debug/tracing/trace text output is readable too.
133
134 ( Note that tracing self tests can't be enabled if this tracer is
135 selected, because the self-tests are an initcall as well and that
136 would invalidate the boot trace. )
137
138 config STACK_TRACER
139 bool "Trace max stack"
140 depends on HAVE_FUNCTION_TRACER
141 depends on DEBUG_KERNEL
142 select FUNCTION_TRACER
143 select STACKTRACE
144 help
145 This special tracer records the maximum stack footprint of the
146 kernel and displays it in debugfs/tracing/stack_trace.
147
148 This tracer works by hooking into every function call that the
149 kernel executes, and keeping a maximum stack depth value and
150 stack-trace saved. Because this logic has to execute in every
151 kernel function, all the time, this option can slow down the
152 kernel measurably and is generally intended for kernel
153 developers only.
154
155 Say N if unsure.
156
157 config DYNAMIC_FTRACE
158 bool "enable/disable ftrace tracepoints dynamically"
159 depends on FUNCTION_TRACER
160 depends on HAVE_DYNAMIC_FTRACE
161 depends on DEBUG_KERNEL
162 default y
163 help
164 This option will modify all the calls to ftrace dynamically
165 (will patch them out of the binary image and replaces them
166 with a No-Op instruction) as they are called. A table is
167 created to dynamically enable them again.
168
169 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
170 has native performance as long as no tracing is active.
171
172 The changes to the code are done by a kernel thread that
173 wakes up once a second and checks to see if any ftrace calls
174 were made. If so, it runs stop_machine (stops all CPUS)
175 and modifies the code to jump over the call to ftrace.
176
177 config FTRACE_MCOUNT_RECORD
178 def_bool y
179 depends on DYNAMIC_FTRACE
180 depends on HAVE_FTRACE_MCOUNT_RECORD
181
182 config FTRACE_SELFTEST
183 bool
184
185 config FTRACE_STARTUP_TEST
186 bool "Perform a startup test on ftrace"
187 depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
188 select FTRACE_SELFTEST
189 help
190 This option performs a series of startup tests on ftrace. On bootup
191 a series of tests are made to verify that the tracer is
192 functioning properly. It will do tests on all the configured
193 tracers of ftrace.