]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - kernel/trace/Kconfig
tracing/ftrace: make nop tracer reset previous entries
[mirror_ubuntu-zesty-kernel.git] / kernel / trace / Kconfig
CommitLineData
16444a8a
ACM
1#
2# Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
3#
4config HAVE_FTRACE
5 bool
bc0c38d1 6
677aa9f7
SR
7config HAVE_DYNAMIC_FTRACE
8 bool
9
8da3821b
SR
10config HAVE_FTRACE_MCOUNT_RECORD
11 bool
12
352ad25a
SR
13config TRACER_MAX_TRACE
14 bool
15
bc0c38d1
SR
16config TRACING
17 bool
18 select DEBUG_FS
86387f7e 19 select STACKTRACE
5f87f112 20 select TRACEPOINTS
bc0c38d1 21
1b29b018
SR
22config FTRACE
23 bool "Kernel Function Tracer"
694379e9 24 depends on HAVE_FTRACE
d3ee6d99 25 depends on DEBUG_KERNEL
1b29b018
SR
26 select FRAME_POINTER
27 select TRACING
35e8e302 28 select CONTEXT_SWITCH_TRACER
1b29b018
SR
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.
35e8e302 37
81d68a96
SR
38config IRQSOFF_TRACER
39 bool "Interrupts-off Latency Tracer"
40 default n
41 depends on TRACE_IRQFLAGS_SUPPORT
42 depends on GENERIC_TIME
c1d2327b 43 depends on HAVE_FTRACE
d3ee6d99 44 depends on DEBUG_KERNEL
81d68a96
SR
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
6cd8a4bb
SR
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
62config PREEMPT_TRACER
63 bool "Preemption-off Latency Tracer"
64 default n
65 depends on GENERIC_TIME
66 depends on PREEMPT
c1d2327b 67 depends on HAVE_FTRACE
d3ee6d99 68 depends on DEBUG_KERNEL
6cd8a4bb
SR
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
f06c3810
IM
85config SYSPROF_TRACER
86 bool "Sysprof Tracer"
4d2df795 87 depends on X86
f06c3810
IM
88 select TRACING
89 help
90 This tracer provides the trace needed by the 'Sysprof' userspace
91 tool.
92
352ad25a
SR
93config SCHED_TRACER
94 bool "Scheduling Latency Tracer"
c1d2327b 95 depends on HAVE_FTRACE
d3ee6d99 96 depends on DEBUG_KERNEL
352ad25a
SR
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
fb1b6d8b
SN
104config 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
35e8e302
SR
114config CONTEXT_SWITCH_TRACER
115 bool "Trace process context switches"
c1d2327b 116 depends on HAVE_FTRACE
d3ee6d99 117 depends on DEBUG_KERNEL
35e8e302
SR
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
e5a81b62
SR
124config STACK_TRACER
125 bool "Trace max stack"
126 depends on HAVE_FTRACE
2ff01c6a 127 depends on DEBUG_KERNEL
e5a81b62
SR
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
3d083395
SR
134config DYNAMIC_FTRACE
135 bool "enable/disable ftrace tracepoints dynamically"
136 depends on FTRACE
677aa9f7 137 depends on HAVE_DYNAMIC_FTRACE
d3ee6d99 138 depends on DEBUG_KERNEL
3d083395
SR
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.
60a11774 153
8da3821b
SR
154config FTRACE_MCOUNT_RECORD
155 def_bool y
156 depends on DYNAMIC_FTRACE
157 depends on HAVE_FTRACE_MCOUNT_RECORD
158
60a11774
SR
159config FTRACE_SELFTEST
160 bool
161
162config FTRACE_STARTUP_TEST
163 bool "Perform a startup test on ftrace"
164 depends on TRACING
d3ee6d99 165 depends on DEBUG_KERNEL
60a11774
SR
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.