Blame view

kernel/trace/Kconfig 19.9 KB
16444a8a4   Arnaldo Carvalho de Melo   ftrace: add basic...
1
  #
606576ce8   Steven Rostedt   ftrace: rename FT...
2
3
  # Architectures that offer an FUNCTION_TRACER implementation should
  #  select HAVE_FUNCTION_TRACER:
16444a8a4   Arnaldo Carvalho de Melo   ftrace: add basic...
4
  #
2a3a4f669   Frédéric Weisbecker   tracing/ftrace: t...
5

8d26487fd   Török Edwin   tracing/stack-tra...
6
7
  config USER_STACKTRACE_SUPPORT
  	bool
2a3a4f669   Frédéric Weisbecker   tracing/ftrace: t...
8
9
  config NOP_TRACER
  	bool
78d904b46   Steven Rostedt   ring-buffer: add ...
10
11
  config HAVE_FTRACE_NMI_ENTER
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
12
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
13
  	  See Documentation/trace/ftrace-design.txt
78d904b46   Steven Rostedt   ring-buffer: add ...
14

606576ce8   Steven Rostedt   ftrace: rename FT...
15
  config HAVE_FUNCTION_TRACER
16444a8a4   Arnaldo Carvalho de Melo   ftrace: add basic...
16
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
17
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
18
  	  See Documentation/trace/ftrace-design.txt
bc0c38d13   Steven Rostedt   ftrace: latency t...
19

fb52607af   Frederic Weisbecker   tracing/function-...
20
  config HAVE_FUNCTION_GRAPH_TRACER
15e6cb367   Frederic Weisbecker   tracing: add a tr...
21
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
22
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
23
  	  See Documentation/trace/ftrace-design.txt
15e6cb367   Frederic Weisbecker   tracing: add a tr...
24

71e308a23   Steven Rostedt   function-graph: a...
25
26
27
  config HAVE_FUNCTION_GRAPH_FP_TEST
  	bool
  	help
036889703   Mike Frysinger   tracing/documenta...
28
  	  See Documentation/trace/ftrace-design.txt
71e308a23   Steven Rostedt   function-graph: a...
29

677aa9f77   Steven Rostedt   ftrace: add have ...
30
31
  config HAVE_DYNAMIC_FTRACE
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
32
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
33
  	  See Documentation/trace/ftrace-design.txt
677aa9f77   Steven Rostedt   ftrace: add have ...
34

06aeaaeab   Masami Hiramatsu   ftrace: Move ARCH...
35
36
  config HAVE_DYNAMIC_FTRACE_WITH_REGS
  	bool
8da3821ba   Steven Rostedt   ftrace: create __...
37
38
  config HAVE_FTRACE_MCOUNT_RECORD
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
39
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
40
  	  See Documentation/trace/ftrace-design.txt
8da3821ba   Steven Rostedt   ftrace: create __...
41

667000011   Josh Stone   tracing: Rename F...
42
  config HAVE_SYSCALL_TRACEPOINTS
ee08c6ecc   Frederic Weisbecker   tracing/ftrace: s...
43
  	bool
555f386c9   Mike Frysinger   ftrace: document ...
44
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
45
  	  See Documentation/trace/ftrace-design.txt
ee08c6ecc   Frederic Weisbecker   tracing/ftrace: s...
46

a2546fae0   Steven Rostedt   ftrace: Add -mfen...
47
48
49
50
  config HAVE_FENTRY
  	bool
  	help
  	  Arch supports the gcc options -pg with -mfentry
cf4db2597   Steven Rostedt   ftrace: Rename co...
51
  config HAVE_C_RECORDMCOUNT
72441cb1f   Steven Rostedt   ftrace/x86: Add s...
52
53
54
  	bool
  	help
  	  C version of recordmcount available?
352ad25aa   Steven Rostedt   ftrace: tracer fo...
55
56
  config TRACER_MAX_TRACE
  	bool
ea632e9f1   Josh Triplett   trace: Stop compi...
57
58
  config TRACE_CLOCK
  	bool
7a8e76a38   Steven Rostedt   tracing: unified ...
59
60
  config RING_BUFFER
  	bool
ea632e9f1   Josh Triplett   trace: Stop compi...
61
  	select TRACE_CLOCK
222876888   Steven Rostedt (Red Hat)   ring-buffer: Sele...
62
  	select IRQ_WORK
7a8e76a38   Steven Rostedt   tracing: unified ...
63

78d904b46   Steven Rostedt   ring-buffer: add ...
64
65
66
67
  config FTRACE_NMI_ENTER
         bool
         depends on HAVE_FTRACE_NMI_ENTER
         default y
5f77a88b3   Tom Zanussi   tracing/infrastru...
68
  config EVENT_TRACING
b11c53e12   Zhaolei   ftrace: Add task_...
69
70
  	select CONTEXT_SWITCH_TRACER
  	bool
7b33772a4   Jamie Gennis   trace/events: add...
71
72
  config GPU_TRACEPOINTS
  	bool
b11c53e12   Zhaolei   ftrace: Add task_...
73
  config CONTEXT_SWITCH_TRACER
5f77a88b3   Tom Zanussi   tracing/infrastru...
74
  	bool
85bac32c4   Steven Rostedt   ring-buffer: only...
75
76
77
78
79
  config RING_BUFFER_ALLOW_SWAP
  	bool
  	help
  	 Allow the use of ring_buffer_swap_cpu.
  	 Adds a very slight overhead to tracing when enabled.
5e0a09391   Steven Rostedt   tracing: fix conf...
80
81
82
83
84
  # All tracer options should select GENERIC_TRACER. For those options that are
  # enabled by all tracers (context switch and event tracer) they select TRACING.
  # This allows those options to appear when no other tracer is selected. But the
  # options do not appear when something else selects it. We need the two options
  # GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the
40892367b   Randy Dunlap   tracing: Kconfig ...
85
  # hiding of the automatic options.
5e0a09391   Steven Rostedt   tracing: fix conf...
86

bc0c38d13   Steven Rostedt   ftrace: latency t...
87
88
89
  config TRACING
  	bool
  	select DEBUG_FS
7a8e76a38   Steven Rostedt   tracing: unified ...
90
  	select RING_BUFFER
c2c805294   Al Viro   tracing, alpha: u...
91
  	select STACKTRACE if STACKTRACE_SUPPORT
5f87f1121   Ingo Molnar   tracing: clean up...
92
  	select TRACEPOINTS
f3384b28a   Steven Rostedt   ftrace: fix trace...
93
  	select NOP_TRACER
769b0441f   Frederic Weisbecker   tracing/core: dro...
94
  	select BINARY_PRINTF
5f77a88b3   Tom Zanussi   tracing/infrastru...
95
  	select EVENT_TRACING
ea632e9f1   Josh Triplett   trace: Stop compi...
96
  	select TRACE_CLOCK
bc0c38d13   Steven Rostedt   ftrace: latency t...
97

5e0a09391   Steven Rostedt   tracing: fix conf...
98
99
100
  config GENERIC_TRACER
  	bool
  	select TRACING
40ada30f9   Ingo Molnar   tracing: clean up...
101
102
103
104
105
106
  #
  # Minimum requirements an architecture has to meet for us to
  # be able to offer generic tracing facilities:
  #
  config TRACING_SUPPORT
  	bool
45b956089   Anton Vorontsov   tracing: Fix TRAC...
107
108
109
110
111
  	# PPC32 has no irqflags tracing support, but it can use most of the
  	# tracers anyway, they were tested to build and work. Note that new
  	# exceptions to this list aren't welcomed, better implement the
  	# irqflags tracing for your architecture.
  	depends on TRACE_IRQFLAGS_SUPPORT || PPC32
40ada30f9   Ingo Molnar   tracing: clean up...
112
  	depends on STACKTRACE_SUPPORT
422d3c7a5   KOSAKI Motohiro   tracing: current ...
113
  	default y
40ada30f9   Ingo Molnar   tracing: clean up...
114
115
  
  if TRACING_SUPPORT
4ed9f0716   Steven Rostedt   tracing: create m...
116
117
  menuconfig FTRACE
  	bool "Tracers"
65b772420   Steven Rostedt   tracing: have men...
118
  	default y if DEBUG_KERNEL
4ed9f0716   Steven Rostedt   tracing: create m...
119
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
120
  	  Enable the kernel tracing infrastructure.
4ed9f0716   Steven Rostedt   tracing: create m...
121
122
  
  if FTRACE
17d80fd07   Peter Zijlstra   tracing: create t...
123

606576ce8   Steven Rostedt   ftrace: rename FT...
124
  config FUNCTION_TRACER
1b29b0188   Steven Rostedt   ftrace: function ...
125
  	bool "Kernel Function Tracer"
606576ce8   Steven Rostedt   ftrace: rename FT...
126
  	depends on HAVE_FUNCTION_TRACER
4d7a077c0   Steven Rostedt   tracing: have fun...
127
  	select KALLSYMS
5e0a09391   Steven Rostedt   tracing: fix conf...
128
  	select GENERIC_TRACER
35e8e302e   Steven Rostedt   ftrace: add traci...
129
  	select CONTEXT_SWITCH_TRACER
1b29b0188   Steven Rostedt   ftrace: function ...
130
131
132
  	help
  	  Enable the kernel to trace every kernel function. This is done
  	  by using a compiler feature to insert a small, 5-byte No-Operation
40892367b   Randy Dunlap   tracing: Kconfig ...
133
  	  instruction at the beginning of every kernel function, which NOP
1b29b0188   Steven Rostedt   ftrace: function ...
134
135
136
137
  	  sequence is then dynamically patched into a tracer call when
  	  tracing is enabled by the administrator. If it's runtime disabled
  	  (the bootup default), then the overhead of the instructions is very
  	  small and not measurable even in micro-benchmarks.
35e8e302e   Steven Rostedt   ftrace: add traci...
138

fb52607af   Frederic Weisbecker   tracing/function-...
139
140
141
  config FUNCTION_GRAPH_TRACER
  	bool "Kernel Function Graph Tracer"
  	depends on HAVE_FUNCTION_GRAPH_TRACER
15e6cb367   Frederic Weisbecker   tracing: add a tr...
142
  	depends on FUNCTION_TRACER
eb4a03780   Steven Rostedt   function-graph: d...
143
  	depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE
764f3b951   Ingo Molnar   tracing/function-...
144
  	default y
15e6cb367   Frederic Weisbecker   tracing: add a tr...
145
  	help
fb52607af   Frederic Weisbecker   tracing/function-...
146
147
  	  Enable the kernel to trace a function at both its return
  	  and its entry.
692105b8a   Matt LaPlante   trivial: fix typo...
148
149
  	  Its first purpose is to trace the duration of functions and
  	  draw a call graph for each thread with some information like
40892367b   Randy Dunlap   tracing: Kconfig ...
150
  	  the return value. This is done by setting the current return
692105b8a   Matt LaPlante   trivial: fix typo...
151
  	  address on the current task structure into a stack of calls.
15e6cb367   Frederic Weisbecker   tracing: add a tr...
152

bac429f03   Steven Rostedt   tracing: add func...
153

81d68a96a   Steven Rostedt   ftrace: trace irq...
154
155
156
157
  config IRQSOFF_TRACER
  	bool "Interrupts-off Latency Tracer"
  	default n
  	depends on TRACE_IRQFLAGS_SUPPORT
592913ecb   John Stultz   time: Kill off CO...
158
  	depends on !ARCH_USES_GETTIMEOFFSET
81d68a96a   Steven Rostedt   ftrace: trace irq...
159
  	select TRACE_IRQFLAGS
5e0a09391   Steven Rostedt   tracing: fix conf...
160
  	select GENERIC_TRACER
81d68a96a   Steven Rostedt   ftrace: trace irq...
161
  	select TRACER_MAX_TRACE
85bac32c4   Steven Rostedt   ring-buffer: only...
162
  	select RING_BUFFER_ALLOW_SWAP
22cffc2bb   Steven Rostedt (Red Hat)   tracing: Enable s...
163
  	select TRACER_SNAPSHOT
0b85ffc29   Steven Rostedt (Red Hat)   tracing: Add conf...
164
  	select TRACER_SNAPSHOT_PER_CPU_SWAP
81d68a96a   Steven Rostedt   ftrace: trace irq...
165
166
167
168
169
170
171
  	help
  	  This option measures the time spent in irqs-off critical
  	  sections, with microsecond accuracy.
  
  	  The default measurement method is a maximum search, which is
  	  disabled by default and can be runtime (re-)started
  	  via:
156f5a780   GeunSik Lim   debugfs: Fix term...
172
  	      echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
81d68a96a   Steven Rostedt   ftrace: trace irq...
173

40892367b   Randy Dunlap   tracing: Kconfig ...
174
  	  (Note that kernel size and overhead increase with this option
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
175
176
177
178
179
180
  	  enabled. This option and the preempt-off timing option can be
  	  used together or separately.)
  
  config PREEMPT_TRACER
  	bool "Preemption-off Latency Tracer"
  	default n
592913ecb   John Stultz   time: Kill off CO...
181
  	depends on !ARCH_USES_GETTIMEOFFSET
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
182
  	depends on PREEMPT
5e0a09391   Steven Rostedt   tracing: fix conf...
183
  	select GENERIC_TRACER
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
184
  	select TRACER_MAX_TRACE
85bac32c4   Steven Rostedt   ring-buffer: only...
185
  	select RING_BUFFER_ALLOW_SWAP
22cffc2bb   Steven Rostedt (Red Hat)   tracing: Enable s...
186
  	select TRACER_SNAPSHOT
0b85ffc29   Steven Rostedt (Red Hat)   tracing: Add conf...
187
  	select TRACER_SNAPSHOT_PER_CPU_SWAP
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
188
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
189
  	  This option measures the time spent in preemption-off critical
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
190
191
192
193
194
  	  sections, with microsecond accuracy.
  
  	  The default measurement method is a maximum search, which is
  	  disabled by default and can be runtime (re-)started
  	  via:
156f5a780   GeunSik Lim   debugfs: Fix term...
195
  	      echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
196

40892367b   Randy Dunlap   tracing: Kconfig ...
197
  	  (Note that kernel size and overhead increase with this option
6cd8a4bb2   Steven Rostedt   ftrace: trace pre...
198
199
  	  enabled. This option and the irqs-off timing option can be
  	  used together or separately.)
352ad25aa   Steven Rostedt   ftrace: tracer fo...
200
201
  config SCHED_TRACER
  	bool "Scheduling Latency Tracer"
5e0a09391   Steven Rostedt   tracing: fix conf...
202
  	select GENERIC_TRACER
352ad25aa   Steven Rostedt   ftrace: tracer fo...
203
204
  	select CONTEXT_SWITCH_TRACER
  	select TRACER_MAX_TRACE
22cffc2bb   Steven Rostedt (Red Hat)   tracing: Enable s...
205
  	select TRACER_SNAPSHOT
352ad25aa   Steven Rostedt   ftrace: tracer fo...
206
207
208
  	help
  	  This tracer tracks the latency of the highest priority task
  	  to be scheduled in, starting from the point it has woken up.
897f17a65   Steven Rostedt   tracing: combine ...
209
210
  config ENABLE_DEFAULT_TRACERS
  	bool "Trace process context switches and events"
5e0a09391   Steven Rostedt   tracing: fix conf...
211
  	depends on !GENERIC_TRACER
b77e38aa2   Steven Rostedt   tracing: add even...
212
213
  	select TRACING
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
214
  	  This tracer hooks to various trace points in the kernel,
b77e38aa2   Steven Rostedt   tracing: add even...
215
  	  allowing the user to pick and choose which trace point they
897f17a65   Steven Rostedt   tracing: combine ...
216
  	  want to trace. It also includes the sched_switch tracer plugin.
a7abe97fd   Steven Rostedt   tracing: rename E...
217

ee08c6ecc   Frederic Weisbecker   tracing/ftrace: s...
218
219
  config FTRACE_SYSCALLS
  	bool "Trace syscalls"
667000011   Josh Stone   tracing: Rename F...
220
  	depends on HAVE_SYSCALL_TRACEPOINTS
5e0a09391   Steven Rostedt   tracing: fix conf...
221
  	select GENERIC_TRACER
0ea1c4156   Frederic Weisbecker   tracing/syscalls:...
222
  	select KALLSYMS
ee08c6ecc   Frederic Weisbecker   tracing/ftrace: s...
223
224
  	help
  	  Basic tracer to catch the syscall entry and exit events.
debdd57f5   Hiraku Toyooka   tracing: Make a s...
225
226
227
228
229
230
231
232
233
  config TRACER_SNAPSHOT
  	bool "Create a snapshot trace buffer"
  	select TRACER_MAX_TRACE
  	help
  	  Allow tracing users to take snapshot of the current buffer using the
  	  ftrace interface, e.g.:
  
  	      echo 1 > /sys/kernel/debug/tracing/snapshot
  	      cat snapshot
0b85ffc29   Steven Rostedt (Red Hat)   tracing: Add conf...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
  config TRACER_SNAPSHOT_PER_CPU_SWAP
          bool "Allow snapshot to swap per CPU"
  	depends on TRACER_SNAPSHOT
  	select RING_BUFFER_ALLOW_SWAP
  	help
  	  Allow doing a snapshot of a single CPU buffer instead of a
  	  full swap (all buffers). If this is set, then the following is
  	  allowed:
  
  	      echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot
  
  	  After which, only the tracing buffer for CPU 2 was swapped with
  	  the main tracing buffer, and the other CPU buffers remain the same.
  
  	  When this is enabled, this adds a little more overhead to the
  	  trace recording, as it needs to add some checks to synchronize
  	  recording with swaps. But this does not affect the performance
  	  of the overall system. This is enabled by default when the preempt
  	  or irq latency tracers are enabled, as those need to swap as well
  	  and already adds the overhead (plus a lot more).
2ed84eeb8   Steven Rostedt   trace: rename unl...
254
  config TRACE_BRANCH_PROFILING
9ae5b8790   Steven Rostedt   tracing: change b...
255
  	bool
5e0a09391   Steven Rostedt   tracing: fix conf...
256
  	select GENERIC_TRACER
9ae5b8790   Steven Rostedt   tracing: change b...
257
258
259
260
261
262
263
264
265
266
  
  choice
  	prompt "Branch Profiling"
  	default BRANCH_PROFILE_NONE
  	help
  	 The branch profiling is a software profiler. It will add hooks
  	 into the C conditionals to test which path a branch takes.
  
  	 The likely/unlikely profiler only looks at the conditions that
  	 are annotated with a likely or unlikely macro.
40892367b   Randy Dunlap   tracing: Kconfig ...
267
  	 The "all branch" profiler will profile every if-statement in the
9ae5b8790   Steven Rostedt   tracing: change b...
268
  	 kernel. This profiler will also enable the likely/unlikely
40892367b   Randy Dunlap   tracing: Kconfig ...
269
  	 profiler.
9ae5b8790   Steven Rostedt   tracing: change b...
270

40892367b   Randy Dunlap   tracing: Kconfig ...
271
272
  	 Either of the above profilers adds a bit of overhead to the system.
  	 If unsure, choose "No branch profiling".
9ae5b8790   Steven Rostedt   tracing: change b...
273
274
275
276
  
  config BRANCH_PROFILE_NONE
  	bool "No branch profiling"
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
277
278
279
  	  No branch profiling. Branch profiling adds a bit of overhead.
  	  Only enable it if you want to analyse the branching behavior.
  	  Otherwise keep it disabled.
9ae5b8790   Steven Rostedt   tracing: change b...
280
281
282
283
  
  config PROFILE_ANNOTATED_BRANCHES
  	bool "Trace likely/unlikely profiler"
  	select TRACE_BRANCH_PROFILING
1f0d69a9f   Steven Rostedt   tracing: profile ...
284
  	help
59bf89640   Masanari Iida   Fix "the the" in ...
285
  	  This tracer profiles all likely and unlikely macros
1f0d69a9f   Steven Rostedt   tracing: profile ...
286
  	  in the kernel. It will display the results in:
13e5befad   David Rientjes   trace, documentat...
287
  	  /sys/kernel/debug/tracing/trace_stat/branch_annotated
1f0d69a9f   Steven Rostedt   tracing: profile ...
288

40892367b   Randy Dunlap   tracing: Kconfig ...
289
  	  Note: this will add a significant overhead; only turn this
1f0d69a9f   Steven Rostedt   tracing: profile ...
290
  	  on if you need to profile the system's use of these macros.
2bcd521a6   Steven Rostedt   trace: profile al...
291
292
  config PROFILE_ALL_BRANCHES
  	bool "Profile all if conditionals"
9ae5b8790   Steven Rostedt   tracing: change b...
293
  	select TRACE_BRANCH_PROFILING
2bcd521a6   Steven Rostedt   trace: profile al...
294
295
296
297
  	help
  	  This tracer profiles all branch conditions. Every if ()
  	  taken in the kernel is recorded whether it hit or miss.
  	  The results will be displayed in:
13e5befad   David Rientjes   trace, documentat...
298
  	  /sys/kernel/debug/tracing/trace_stat/branch_all
2bcd521a6   Steven Rostedt   trace: profile al...
299

9ae5b8790   Steven Rostedt   tracing: change b...
300
  	  This option also enables the likely/unlikely profiler.
2bcd521a6   Steven Rostedt   trace: profile al...
301
302
  	  This configuration, when enabled, will impose a great overhead
  	  on the system. This should only be enabled when the system
40892367b   Randy Dunlap   tracing: Kconfig ...
303
  	  is to be analyzed in much detail.
9ae5b8790   Steven Rostedt   tracing: change b...
304
  endchoice
2bcd521a6   Steven Rostedt   trace: profile al...
305

2ed84eeb8   Steven Rostedt   trace: rename unl...
306
  config TRACING_BRANCHES
52f232cb7   Steven Rostedt   tracing: likely/u...
307
308
309
310
311
312
  	bool
  	help
  	  Selected by tracers that will trace the likely and unlikely
  	  conditions. This prevents the tracers themselves from being
  	  profiled. Profiling the tracing infrastructure can only happen
  	  when the likelys and unlikelys are not being traced.
2ed84eeb8   Steven Rostedt   trace: rename unl...
313
  config BRANCH_TRACER
52f232cb7   Steven Rostedt   tracing: likely/u...
314
  	bool "Trace likely/unlikely instances"
2ed84eeb8   Steven Rostedt   trace: rename unl...
315
316
  	depends on TRACE_BRANCH_PROFILING
  	select TRACING_BRANCHES
52f232cb7   Steven Rostedt   tracing: likely/u...
317
318
319
320
321
322
323
324
325
  	help
  	  This traces the events of likely and unlikely condition
  	  calls in the kernel.  The difference between this and the
  	  "Trace likely/unlikely profiler" is that this is not a
  	  histogram of the callers, but actually places the calling
  	  events into a running trace buffer to see when and where the
  	  events happened, as well as their results.
  
  	  Say N if unsure.
e5a81b629   Steven Rostedt   ftrace: add stack...
326
327
  config STACK_TRACER
  	bool "Trace max stack"
606576ce8   Steven Rostedt   ftrace: rename FT...
328
  	depends on HAVE_FUNCTION_TRACER
606576ce8   Steven Rostedt   ftrace: rename FT...
329
  	select FUNCTION_TRACER
e5a81b629   Steven Rostedt   ftrace: add stack...
330
  	select STACKTRACE
4d7a077c0   Steven Rostedt   tracing: have fun...
331
  	select KALLSYMS
e5a81b629   Steven Rostedt   ftrace: add stack...
332
  	help
4519d9e54   Ingo Molnar   tracing/stacktrac...
333
  	  This special tracer records the maximum stack footprint of the
156f5a780   GeunSik Lim   debugfs: Fix term...
334
  	  kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
4519d9e54   Ingo Molnar   tracing/stacktrac...
335
336
337
  
  	  This tracer works by hooking into every function call that the
  	  kernel executes, and keeping a maximum stack depth value and
f38f1d2aa   Steven Rostedt   trace: add a way ...
338
339
340
341
342
343
344
345
346
  	  stack-trace saved.  If this is configured with DYNAMIC_FTRACE
  	  then it will not have any overhead while the stack tracer
  	  is disabled.
  
  	  To enable the stack tracer on bootup, pass in 'stacktrace'
  	  on the kernel command line.
  
  	  The stack tracer can also be enabled or disabled via the
  	  sysctl kernel.stack_tracer_enabled
4519d9e54   Ingo Molnar   tracing/stacktrac...
347
348
  
  	  Say N if unsure.
e5a81b629   Steven Rostedt   ftrace: add stack...
349

2db270a80   Frederic Weisbecker   tracing/blktrace:...
350
  config BLK_DEV_IO_TRACE
40892367b   Randy Dunlap   tracing: Kconfig ...
351
  	bool "Support for tracing block IO actions"
2db270a80   Frederic Weisbecker   tracing/blktrace:...
352
  	depends on SYSFS
1dfba05d0   Ingo Molnar   tracing/blktrace:...
353
  	depends on BLOCK
2db270a80   Frederic Weisbecker   tracing/blktrace:...
354
355
356
  	select RELAY
  	select DEBUG_FS
  	select TRACEPOINTS
5e0a09391   Steven Rostedt   tracing: fix conf...
357
  	select GENERIC_TRACER
2db270a80   Frederic Weisbecker   tracing/blktrace:...
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
  	select STACKTRACE
  	help
  	  Say Y here if you want to be able to trace the block layer actions
  	  on a given queue. Tracing allows you to see any traffic happening
  	  on a block device queue. For more information (and the userspace
  	  support tools needed), fetch the blktrace tools from:
  
  	  git://git.kernel.dk/blktrace.git
  
  	  Tracing also is possible using the ftrace interface, e.g.:
  
  	    echo 1 > /sys/block/sda/sda1/trace/enable
  	    echo blk > /sys/kernel/debug/tracing/current_tracer
  	    cat /sys/kernel/debug/tracing/trace_pipe
  
  	  If unsure, say N.
36994e58a   Frederic Weisbecker   tracing/kmemtrace...
374

77b44d1b7   Masami Hiramatsu   tracing/kprobes: ...
375
  config KPROBE_EVENT
413d37d1e   Masami Hiramatsu   tracing: Add kpro...
376
  	depends on KPROBES
f850c30c8   Heiko Carstens   tracing/kprobes: ...
377
  	depends on HAVE_REGS_AND_STACK_ACCESS_API
77b44d1b7   Masami Hiramatsu   tracing/kprobes: ...
378
  	bool "Enable kprobes-based dynamic events"
413d37d1e   Masami Hiramatsu   tracing: Add kpro...
379
  	select TRACING
8ab83f564   Srikar Dronamraju   tracing: Extract ...
380
  	select PROBE_EVENTS
77b44d1b7   Masami Hiramatsu   tracing/kprobes: ...
381
  	default y
413d37d1e   Masami Hiramatsu   tracing: Add kpro...
382
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
383
384
385
  	  This allows the user to add tracing events (similar to tracepoints)
  	  on the fly via the ftrace interface. See
  	  Documentation/trace/kprobetrace.txt for more details.
77b44d1b7   Masami Hiramatsu   tracing/kprobes: ...
386
387
388
  
  	  Those events can be inserted wherever kprobes can probe, and record
  	  various register and memory values.
40892367b   Randy Dunlap   tracing: Kconfig ...
389
390
  	  This option is also required by perf-probe subcommand of perf tools.
  	  If you want to use perf tools, this option is strongly recommended.
413d37d1e   Masami Hiramatsu   tracing: Add kpro...
391

f3f096cfe   Srikar Dronamraju   tracing: Provide ...
392
393
394
395
  config UPROBE_EVENT
  	bool "Enable uprobes-based dynamic events"
  	depends on ARCH_SUPPORTS_UPROBES
  	depends on MMU
09294e31b   David A. Long   uprobes: Kconfig ...
396
  	depends on PERF_EVENTS
f3f096cfe   Srikar Dronamraju   tracing: Provide ...
397
398
399
400
401
402
403
404
405
406
407
  	select UPROBES
  	select PROBE_EVENTS
  	select TRACING
  	default n
  	help
  	  This allows the user to add tracing events on top of userspace
  	  dynamic events (similar to tracepoints) on the fly via the trace
  	  events interface. Those events can be inserted wherever uprobes
  	  can probe, and record various registers.
  	  This option is required if you plan to use perf-probe subcommand
  	  of perf tools on user space applications.
e1abf2cc8   Ingo Molnar   bpf: Fix the buil...
408
409
410
411
412
413
414
  config BPF_EVENTS
  	depends on BPF_SYSCALL
  	depends on KPROBE_EVENT
  	bool
  	default y
  	help
  	  This allows the user to attach BPF programs to kprobe events.
8ab83f564   Srikar Dronamraju   tracing: Extract ...
415
416
  config PROBE_EVENTS
  	def_bool n
3d0833953   Steven Rostedt   ftrace: dynamic e...
417
  config DYNAMIC_FTRACE
db05021d4   Steven Rostedt   ftrace: Update th...
418
  	bool "enable/disable function tracing dynamically"
606576ce8   Steven Rostedt   ftrace: rename FT...
419
  	depends on FUNCTION_TRACER
677aa9f77   Steven Rostedt   ftrace: add have ...
420
  	depends on HAVE_DYNAMIC_FTRACE
3d0833953   Steven Rostedt   ftrace: dynamic e...
421
422
  	default y
  	help
db05021d4   Steven Rostedt   ftrace: Update th...
423
424
425
426
427
428
429
430
431
432
433
434
435
  	  This option will modify all the calls to function tracing
  	  dynamically (will patch them out of the binary image and
  	  replace them with a No-Op instruction) on boot up. During
  	  compile time, a table is made of all the locations that ftrace
  	  can function trace, and this table is linked into the kernel
  	  image. When this is enabled, functions can be individually
  	  enabled, and the functions not enabled will not affect
  	  performance of the system.
  
  	  See the files in /sys/kernel/debug/tracing:
  	    available_filter_functions
  	    set_ftrace_filter
  	    set_ftrace_notrace
3d0833953   Steven Rostedt   ftrace: dynamic e...
436

40892367b   Randy Dunlap   tracing: Kconfig ...
437
438
  	  This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but
  	  otherwise has native performance as long as no tracing is active.
3d0833953   Steven Rostedt   ftrace: dynamic e...
439

06aeaaeab   Masami Hiramatsu   ftrace: Move ARCH...
440
441
442
443
  config DYNAMIC_FTRACE_WITH_REGS
  	def_bool y
  	depends on DYNAMIC_FTRACE
  	depends on HAVE_DYNAMIC_FTRACE_WITH_REGS
bac429f03   Steven Rostedt   tracing: add func...
444
445
  config FUNCTION_PROFILER
  	bool "Kernel function profiler"
493762fc5   Steven Rostedt   tracing: move fun...
446
  	depends on FUNCTION_TRACER
bac429f03   Steven Rostedt   tracing: add func...
447
448
  	default n
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
449
450
451
452
453
454
  	  This option enables the kernel function profiler. A file is created
  	  in debugfs called function_profile_enabled which defaults to zero.
  	  When a 1 is echoed into this file profiling begins, and when a
  	  zero is entered, profiling stops. A "functions" file is created in
  	  the trace_stats directory; this file shows the list of functions that
  	  have been hit and their counters.
bac429f03   Steven Rostedt   tracing: add func...
455

40892367b   Randy Dunlap   tracing: Kconfig ...
456
  	  If in doubt, say N.
bac429f03   Steven Rostedt   tracing: add func...
457

8da3821ba   Steven Rostedt   ftrace: create __...
458
459
460
461
  config FTRACE_MCOUNT_RECORD
  	def_bool y
  	depends on DYNAMIC_FTRACE
  	depends on HAVE_FTRACE_MCOUNT_RECORD
60a11774b   Steven Rostedt   ftrace: add self-...
462
463
464
465
466
  config FTRACE_SELFTEST
  	bool
  
  config FTRACE_STARTUP_TEST
  	bool "Perform a startup test on ftrace"
5e0a09391   Steven Rostedt   tracing: fix conf...
467
  	depends on GENERIC_TRACER
60a11774b   Steven Rostedt   ftrace: add self-...
468
469
470
471
472
473
  	select FTRACE_SELFTEST
  	help
  	  This option performs a series of startup tests on ftrace. On bootup
  	  a series of tests are made to verify that the tracer is
  	  functioning properly. It will do tests on all the configured
  	  tracers of ftrace.
17d80fd07   Peter Zijlstra   tracing: create t...
474

1f5a6b454   Steven Rostedt   tracing: make tes...
475
476
477
478
479
480
481
482
483
484
485
  config EVENT_TRACE_TEST_SYSCALLS
  	bool "Run selftest on syscall events"
  	depends on FTRACE_STARTUP_TEST
  	help
  	 This option will also enable testing every syscall event.
  	 It only enables the event and disables it and runs various loads
  	 with the event enabled. This adds a bit more time for kernel boot
  	 up since it runs this on every system call defined.
  
  	 TBD - enable a way to actually call the syscalls as we test their
  	       events
fe6f90e57   Pekka Paalanen   trace: mmiotrace ...
486
487
  config MMIOTRACE
  	bool "Memory mapped IO tracing"
40ada30f9   Ingo Molnar   tracing: clean up...
488
  	depends on HAVE_MMIOTRACE_SUPPORT && PCI
5e0a09391   Steven Rostedt   tracing: fix conf...
489
  	select GENERIC_TRACER
fe6f90e57   Pekka Paalanen   trace: mmiotrace ...
490
491
492
493
494
  	help
  	  Mmiotrace traces Memory Mapped I/O access and is meant for
  	  debugging and reverse engineering. It is called from the ioremap
  	  implementation and works via page faults. Tracing is disabled by
  	  default and can be enabled at run-time.
4d1f4372d   Li Zefan   tracing: fix docu...
495
  	  See Documentation/trace/mmiotrace.txt.
fe6f90e57   Pekka Paalanen   trace: mmiotrace ...
496
497
498
499
500
501
502
503
504
505
506
  	  If you are not helping to develop drivers, say N.
  
  config MMIOTRACE_TEST
  	tristate "Test module for mmiotrace"
  	depends on MMIOTRACE && m
  	help
  	  This is a dumb module for testing mmiotrace. It is very dangerous
  	  as it will write garbage to IO memory starting at a given address.
  	  However, it should be safe to use on e.g. unused portion of VRAM.
  
  	  Say N, unless you absolutely know what you are doing.
81dc9f0ef   Steven Rostedt (Red Hat)   tracing: Add trac...
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
  config TRACEPOINT_BENCHMARK
          bool "Add tracepoint that benchmarks tracepoints"
  	help
  	 This option creates the tracepoint "benchmark:benchmark_event".
  	 When the tracepoint is enabled, it kicks off a kernel thread that
  	 goes into an infinite loop (calling cond_sched() to let other tasks
  	 run), and calls the tracepoint. Each iteration will record the time
  	 it took to write to the tracepoint and the next iteration that
  	 data will be passed to the tracepoint itself. That is, the tracepoint
  	 will report the time it took to do the previous tracepoint.
  	 The string written to the tracepoint is a static string of 128 bytes
  	 to keep the time the same. The initial string is simply a write of
  	 "START". The second string records the cold cache time of the first
  	 write which is not added to the rest of the calculations.
  
  	 As it is a tight loop, it benchmarks as hot cache. That's fine because
  	 we care most about hot paths that are probably in cache already.
  
  	 An example of the output:
  
  	      START
  	      first=3672 [COLD CACHED]
  	      last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712
  	      last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337
  	      last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064
  	      last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411
  	      last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389
  	      last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666
5092dbc96   Steven Rostedt   ring-buffer: add ...
535
536
537
538
  config RING_BUFFER_BENCHMARK
  	tristate "Ring buffer benchmark stress tester"
  	depends on RING_BUFFER
  	help
40892367b   Randy Dunlap   tracing: Kconfig ...
539
540
  	  This option creates a test to stress the ring buffer and benchmark it.
  	  It creates its own ring buffer such that it will not interfere with
5092dbc96   Steven Rostedt   ring-buffer: add ...
541
542
543
544
545
546
547
  	  any other users of the ring buffer (such as ftrace). It then creates
  	  a producer and consumer that will run for 10 seconds and sleep for
  	  10 seconds. Each interval it will print out the number of events
  	  it recorded and give a rough estimate of how long each iteration took.
  
  	  It does not disable interrupts or raise its priority, so it may be
  	  affected by processes that are running.
40892367b   Randy Dunlap   tracing: Kconfig ...
548
  	  If unsure, say N.
5092dbc96   Steven Rostedt   ring-buffer: add ...
549

6c43e554a   Steven Rostedt (Red Hat)   ring-buffer: Add ...
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
  config RING_BUFFER_STARTUP_TEST
         bool "Ring buffer startup self test"
         depends on RING_BUFFER
         help
           Run a simple self test on the ring buffer on boot up. Late in the
  	 kernel boot sequence, the test will start that kicks off
  	 a thread per cpu. Each thread will write various size events
  	 into the ring buffer. Another thread is created to send IPIs
  	 to each of the threads, where the IPI handler will also write
  	 to the ring buffer, to test/stress the nesting ability.
  	 If any anomalies are discovered, a warning will be displayed
  	 and all ring buffers will be disabled.
  
  	 The test runs for 10 seconds. This will slow your boot time
  	 by at least 10 more seconds.
  
  	 At the end of the test, statics and more checks are done.
  	 It will output the stats of each per cpu buffer. What
  	 was written, the sizes, what was read, what was lost, and
  	 other similar details.
  
  	 If unsure, say N
9828413d4   Steven Rostedt (Red Hat)   tracing: Add enum...
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
  config TRACE_ENUM_MAP_FILE
         bool "Show enum mappings for trace events"
         depends on TRACING
         help
          The "print fmt" of the trace events will show the enum names instead
  	of their values. This can cause problems for user space tools that
  	use this string to parse the raw data as user space does not know
  	how to convert the string to its value.
  
  	To fix this, there's a special macro in the kernel that can be used
  	to convert the enum into its value. If this macro is used, then the
  	print fmt strings will have the enums converted to their values.
  
  	If something does not get converted properly, this option can be
  	used to show what enums the kernel tried to convert.
  
  	This option is for debugging the enum conversions. A file is created
  	in the tracing directory called "enum_map" that will show the enum
  	names matched with their values and what trace event system they
  	belong too.
  
  	Normally, the mapping of the strings to values will be freed after
  	boot up or module load. With this option, they will not be freed, as
  	they are needed for the "enum_map" file. Enabling this option will
  	increase the memory footprint of the running kernel.
  
  	If unsure, say N
4ed9f0716   Steven Rostedt   tracing: create m...
599
  endif # FTRACE
40ada30f9   Ingo Molnar   tracing: clean up...
600
601
  
  endif # TRACING_SUPPORT