| .. | .. | 
|---|
 | 1 | +# SPDX-License-Identifier: GPL-2.0-only  | 
|---|
| 1 | 2 |  # | 
|---|
| 2 | 3 |  # Architectures that offer an FUNCTION_TRACER implementation should | 
|---|
| 3 | 4 |  #  select HAVE_FUNCTION_TRACER: | 
|---|
| .. | .. | 
|---|
| 8 | 9 |   | 
|---|
| 9 | 10 |  config NOP_TRACER | 
|---|
| 10 | 11 |  	bool | 
|---|
| 11 |  | -  | 
|---|
| 12 |  | -config HAVE_FTRACE_NMI_ENTER  | 
|---|
| 13 |  | -	bool  | 
|---|
| 14 |  | -	help  | 
|---|
| 15 |  | -	  See Documentation/trace/ftrace-design.rst  | 
|---|
| 16 | 12 |   | 
|---|
| 17 | 13 |  config HAVE_FUNCTION_TRACER | 
|---|
| 18 | 14 |  	bool | 
|---|
| .. | .. | 
|---|
| 30 | 26 |  	  See Documentation/trace/ftrace-design.rst | 
|---|
| 31 | 27 |   | 
|---|
| 32 | 28 |  config HAVE_DYNAMIC_FTRACE_WITH_REGS | 
|---|
 | 29 | +	bool  | 
|---|
 | 30 | +  | 
|---|
 | 31 | +config HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS  | 
|---|
| 33 | 32 |  	bool | 
|---|
| 34 | 33 |   | 
|---|
| 35 | 34 |  config HAVE_FTRACE_MCOUNT_RECORD | 
|---|
| .. | .. | 
|---|
| 52 | 51 |  	help | 
|---|
| 53 | 52 |  	  Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount | 
|---|
| 54 | 53 |   | 
|---|
 | 54 | +config HAVE_OBJTOOL_MCOUNT  | 
|---|
 | 55 | +	bool  | 
|---|
 | 56 | +	help  | 
|---|
 | 57 | +	  Arch supports objtool --mcount  | 
|---|
 | 58 | +  | 
|---|
| 55 | 59 |  config HAVE_C_RECORDMCOUNT | 
|---|
| 56 | 60 |  	bool | 
|---|
| 57 | 61 |  	help | 
|---|
| .. | .. | 
|---|
| 68 | 72 |  	select TRACE_CLOCK | 
|---|
| 69 | 73 |  	select IRQ_WORK | 
|---|
| 70 | 74 |   | 
|---|
| 71 |  | -config FTRACE_NMI_ENTER  | 
|---|
| 72 |  | -       bool  | 
|---|
| 73 |  | -       depends on HAVE_FTRACE_NMI_ENTER  | 
|---|
| 74 |  | -       default y  | 
|---|
| 75 |  | -  | 
|---|
| 76 | 75 |  config EVENT_TRACING | 
|---|
| 77 | 76 |  	select CONTEXT_SWITCH_TRACER | 
|---|
| 78 |  | -        select GLOB  | 
|---|
 | 77 | +	select GLOB  | 
|---|
| 79 | 78 |  	bool | 
|---|
| 80 | 79 |   | 
|---|
| 81 | 80 |  config CONTEXT_SWITCH_TRACER | 
|---|
| .. | .. | 
|---|
| 87 | 86 |  	 Allow the use of ring_buffer_swap_cpu. | 
|---|
| 88 | 87 |  	 Adds a very slight overhead to tracing when enabled. | 
|---|
| 89 | 88 |   | 
|---|
 | 89 | +config TRACE_MMIO_ACCESS  | 
|---|
 | 90 | +	bool "Register read/write tracing"  | 
|---|
 | 91 | +	depends on TRACING  | 
|---|
 | 92 | +	depends on ARM64  | 
|---|
 | 93 | +	help  | 
|---|
 | 94 | +	  Create tracepoints for IO read/write operations. These trace events  | 
|---|
 | 95 | +	  can be used for logging all MMIO read/write operations.  | 
|---|
 | 96 | +  | 
|---|
| 90 | 97 |  config PREEMPTIRQ_TRACEPOINTS | 
|---|
| 91 | 98 |  	bool | 
|---|
| 92 | 99 |  	depends on TRACE_PREEMPT_TOGGLE || TRACE_IRQFLAGS | 
|---|
| .. | .. | 
|---|
| 95 | 102 |  	help | 
|---|
| 96 | 103 |  	  Create preempt/irq toggle tracepoints if needed, so that other parts | 
|---|
| 97 | 104 |  	  of the kernel can use them to generate or add hooks to them. | 
|---|
 | 105 | +  | 
|---|
 | 106 | +menuconfig TRACEFS_DISABLE_AUTOMOUNT  | 
|---|
 | 107 | +	bool "Do not autmount tracefs in the debugfs filesystem"  | 
|---|
 | 108 | +	help  | 
|---|
 | 109 | +	  Provides an option to not automount tracefs in /sys/kernel/debug/tracing.  | 
|---|
| 98 | 110 |   | 
|---|
| 99 | 111 |  # All tracer options should select GENERIC_TRACER. For those options that are | 
|---|
| 100 | 112 |  # enabled by all tracers (context switch and event tracer) they select TRACING. | 
|---|
| .. | .. | 
|---|
| 137 | 149 |   | 
|---|
| 138 | 150 |  if FTRACE | 
|---|
| 139 | 151 |   | 
|---|
 | 152 | +config BOOTTIME_TRACING  | 
|---|
 | 153 | +	bool "Boot-time Tracing support"  | 
|---|
 | 154 | +	depends on TRACING  | 
|---|
 | 155 | +	select BOOT_CONFIG  | 
|---|
 | 156 | +	help  | 
|---|
 | 157 | +	  Enable developer to setup ftrace subsystem via supplemental  | 
|---|
 | 158 | +	  kernel cmdline at boot time for debugging (tracing) driver  | 
|---|
 | 159 | +	  initialization and boot process.  | 
|---|
 | 160 | +  | 
|---|
| 140 | 161 |  config FUNCTION_TRACER | 
|---|
| 141 | 162 |  	bool "Kernel Function Tracer" | 
|---|
| 142 | 163 |  	depends on HAVE_FUNCTION_TRACER | 
|---|
| .. | .. | 
|---|
| 144 | 165 |  	select GENERIC_TRACER | 
|---|
| 145 | 166 |  	select CONTEXT_SWITCH_TRACER | 
|---|
| 146 | 167 |  	select GLOB | 
|---|
| 147 |  | -	select TASKS_RCU if PREEMPT  | 
|---|
 | 168 | +	select TASKS_RCU if PREEMPTION  | 
|---|
 | 169 | +	select TASKS_RUDE_RCU  | 
|---|
| 148 | 170 |  	help | 
|---|
| 149 | 171 |  	  Enable the kernel to trace every kernel function. This is done | 
|---|
| 150 | 172 |  	  by using a compiler feature to insert a small, 5-byte No-Operation | 
|---|
| .. | .. | 
|---|
| 168 | 190 |  	  the return value. This is done by setting the current return | 
|---|
| 169 | 191 |  	  address on the current task structure into a stack of calls. | 
|---|
| 170 | 192 |   | 
|---|
 | 193 | +config DYNAMIC_FTRACE  | 
|---|
 | 194 | +	bool "enable/disable function tracing dynamically"  | 
|---|
 | 195 | +	depends on FUNCTION_TRACER  | 
|---|
 | 196 | +	depends on HAVE_DYNAMIC_FTRACE  | 
|---|
 | 197 | +	default y  | 
|---|
 | 198 | +	help  | 
|---|
 | 199 | +	  This option will modify all the calls to function tracing  | 
|---|
 | 200 | +	  dynamically (will patch them out of the binary image and  | 
|---|
 | 201 | +	  replace them with a No-Op instruction) on boot up. During  | 
|---|
 | 202 | +	  compile time, a table is made of all the locations that ftrace  | 
|---|
 | 203 | +	  can function trace, and this table is linked into the kernel  | 
|---|
 | 204 | +	  image. When this is enabled, functions can be individually  | 
|---|
 | 205 | +	  enabled, and the functions not enabled will not affect  | 
|---|
 | 206 | +	  performance of the system.  | 
|---|
 | 207 | +  | 
|---|
 | 208 | +	  See the files in /sys/kernel/debug/tracing:  | 
|---|
 | 209 | +	    available_filter_functions  | 
|---|
 | 210 | +	    set_ftrace_filter  | 
|---|
 | 211 | +	    set_ftrace_notrace  | 
|---|
 | 212 | +  | 
|---|
 | 213 | +	  This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but  | 
|---|
 | 214 | +	  otherwise has native performance as long as no tracing is active.  | 
|---|
 | 215 | +  | 
|---|
 | 216 | +config DYNAMIC_FTRACE_WITH_REGS  | 
|---|
 | 217 | +	def_bool y  | 
|---|
 | 218 | +	depends on DYNAMIC_FTRACE  | 
|---|
 | 219 | +	depends on HAVE_DYNAMIC_FTRACE_WITH_REGS  | 
|---|
 | 220 | +  | 
|---|
 | 221 | +config DYNAMIC_FTRACE_WITH_DIRECT_CALLS  | 
|---|
 | 222 | +	def_bool y  | 
|---|
 | 223 | +	depends on DYNAMIC_FTRACE_WITH_REGS  | 
|---|
 | 224 | +	depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS  | 
|---|
 | 225 | +  | 
|---|
 | 226 | +config FUNCTION_PROFILER  | 
|---|
 | 227 | +	bool "Kernel function profiler"  | 
|---|
 | 228 | +	depends on FUNCTION_TRACER  | 
|---|
 | 229 | +	default n  | 
|---|
 | 230 | +	help  | 
|---|
 | 231 | +	  This option enables the kernel function profiler. A file is created  | 
|---|
 | 232 | +	  in debugfs called function_profile_enabled which defaults to zero.  | 
|---|
 | 233 | +	  When a 1 is echoed into this file profiling begins, and when a  | 
|---|
 | 234 | +	  zero is entered, profiling stops. A "functions" file is created in  | 
|---|
 | 235 | +	  the trace_stat directory; this file shows the list of functions that  | 
|---|
 | 236 | +	  have been hit and their counters.  | 
|---|
 | 237 | +  | 
|---|
 | 238 | +	  If in doubt, say N.  | 
|---|
 | 239 | +  | 
|---|
 | 240 | +config STACK_TRACER  | 
|---|
 | 241 | +	bool "Trace max stack"  | 
|---|
 | 242 | +	depends on HAVE_FUNCTION_TRACER  | 
|---|
 | 243 | +	select FUNCTION_TRACER  | 
|---|
 | 244 | +	select STACKTRACE  | 
|---|
 | 245 | +	select KALLSYMS  | 
|---|
 | 246 | +	help  | 
|---|
 | 247 | +	  This special tracer records the maximum stack footprint of the  | 
|---|
 | 248 | +	  kernel and displays it in /sys/kernel/debug/tracing/stack_trace.  | 
|---|
 | 249 | +  | 
|---|
 | 250 | +	  This tracer works by hooking into every function call that the  | 
|---|
 | 251 | +	  kernel executes, and keeping a maximum stack depth value and  | 
|---|
 | 252 | +	  stack-trace saved.  If this is configured with DYNAMIC_FTRACE  | 
|---|
 | 253 | +	  then it will not have any overhead while the stack tracer  | 
|---|
 | 254 | +	  is disabled.  | 
|---|
 | 255 | +  | 
|---|
 | 256 | +	  To enable the stack tracer on bootup, pass in 'stacktrace'  | 
|---|
 | 257 | +	  on the kernel command line.  | 
|---|
 | 258 | +  | 
|---|
 | 259 | +	  The stack tracer can also be enabled or disabled via the  | 
|---|
 | 260 | +	  sysctl kernel.stack_tracer_enabled  | 
|---|
 | 261 | +  | 
|---|
 | 262 | +	  Say N if unsure.  | 
|---|
 | 263 | +  | 
|---|
| 171 | 264 |  config TRACE_PREEMPT_TOGGLE | 
|---|
| 172 | 265 |  	bool | 
|---|
| 173 | 266 |  	help | 
|---|
| 174 | 267 |  	  Enables hooks which will be called when preemption is first disabled, | 
|---|
| 175 | 268 |  	  and last enabled. | 
|---|
| 176 |  | -  | 
|---|
| 177 |  | -config PREEMPTIRQ_EVENTS  | 
|---|
| 178 |  | -	bool "Enable trace events for preempt and irq disable/enable"  | 
|---|
| 179 |  | -	select TRACE_IRQFLAGS  | 
|---|
| 180 |  | -	select TRACE_PREEMPT_TOGGLE if PREEMPT  | 
|---|
| 181 |  | -	select GENERIC_TRACER  | 
|---|
| 182 |  | -	default n  | 
|---|
| 183 |  | -	help  | 
|---|
| 184 |  | -	  Enable tracing of disable and enable events for preemption and irqs.  | 
|---|
| 185 | 269 |   | 
|---|
| 186 | 270 |  config IRQSOFF_TRACER | 
|---|
| 187 | 271 |  	bool "Interrupts-off Latency Tracer" | 
|---|
| .. | .. | 
|---|
| 212 | 296 |  	bool "Preemption-off Latency Tracer" | 
|---|
| 213 | 297 |  	default n | 
|---|
| 214 | 298 |  	depends on !ARCH_USES_GETTIMEOFFSET | 
|---|
| 215 |  | -	depends on PREEMPT  | 
|---|
 | 299 | +	depends on PREEMPTION  | 
|---|
| 216 | 300 |  	select GENERIC_TRACER | 
|---|
| 217 | 301 |  	select TRACER_MAX_TRACE | 
|---|
| 218 | 302 |  	select RING_BUFFER_ALLOW_SWAP | 
|---|
| .. | .. | 
|---|
| 278 | 362 |  	 file. Every time a latency is greater than tracing_thresh, it will | 
|---|
| 279 | 363 |  	 be recorded into the ring buffer. | 
|---|
| 280 | 364 |   | 
|---|
 | 365 | +config MMIOTRACE  | 
|---|
 | 366 | +	bool "Memory mapped IO tracing"  | 
|---|
 | 367 | +	depends on HAVE_MMIOTRACE_SUPPORT && PCI  | 
|---|
 | 368 | +	select GENERIC_TRACER  | 
|---|
 | 369 | +	help  | 
|---|
 | 370 | +	  Mmiotrace traces Memory Mapped I/O access and is meant for  | 
|---|
 | 371 | +	  debugging and reverse engineering. It is called from the ioremap  | 
|---|
 | 372 | +	  implementation and works via page faults. Tracing is disabled by  | 
|---|
 | 373 | +	  default and can be enabled at run-time.  | 
|---|
 | 374 | +  | 
|---|
 | 375 | +	  See Documentation/trace/mmiotrace.rst.  | 
|---|
 | 376 | +	  If you are not helping to develop drivers, say N.  | 
|---|
 | 377 | +  | 
|---|
| 281 | 378 |  config ENABLE_DEFAULT_TRACERS | 
|---|
| 282 | 379 |  	bool "Trace process context switches and events" | 
|---|
| 283 | 380 |  	depends on !GENERIC_TRACER | 
|---|
| .. | .. | 
|---|
| 306 | 403 |  	      cat snapshot | 
|---|
| 307 | 404 |   | 
|---|
| 308 | 405 |  config TRACER_SNAPSHOT_PER_CPU_SWAP | 
|---|
| 309 |  | -        bool "Allow snapshot to swap per CPU"  | 
|---|
 | 406 | +	bool "Allow snapshot to swap per CPU"  | 
|---|
| 310 | 407 |  	depends on TRACER_SNAPSHOT | 
|---|
| 311 | 408 |  	select RING_BUFFER_ALLOW_SWAP | 
|---|
| 312 | 409 |  	help | 
|---|
| .. | .. | 
|---|
| 405 | 502 |   | 
|---|
| 406 | 503 |  	  Say N if unsure. | 
|---|
| 407 | 504 |   | 
|---|
| 408 |  | -config STACK_TRACER  | 
|---|
| 409 |  | -	bool "Trace max stack"  | 
|---|
| 410 |  | -	depends on HAVE_FUNCTION_TRACER  | 
|---|
| 411 |  | -	select FUNCTION_TRACER  | 
|---|
| 412 |  | -	select STACKTRACE  | 
|---|
| 413 |  | -	select KALLSYMS  | 
|---|
| 414 |  | -	help  | 
|---|
| 415 |  | -	  This special tracer records the maximum stack footprint of the  | 
|---|
| 416 |  | -	  kernel and displays it in /sys/kernel/debug/tracing/stack_trace.  | 
|---|
| 417 |  | -  | 
|---|
| 418 |  | -	  This tracer works by hooking into every function call that the  | 
|---|
| 419 |  | -	  kernel executes, and keeping a maximum stack depth value and  | 
|---|
| 420 |  | -	  stack-trace saved.  If this is configured with DYNAMIC_FTRACE  | 
|---|
| 421 |  | -	  then it will not have any overhead while the stack tracer  | 
|---|
| 422 |  | -	  is disabled.  | 
|---|
| 423 |  | -  | 
|---|
| 424 |  | -	  To enable the stack tracer on bootup, pass in 'stacktrace'  | 
|---|
| 425 |  | -	  on the kernel command line.  | 
|---|
| 426 |  | -  | 
|---|
| 427 |  | -	  The stack tracer can also be enabled or disabled via the  | 
|---|
| 428 |  | -	  sysctl kernel.stack_tracer_enabled  | 
|---|
| 429 |  | -  | 
|---|
| 430 |  | -	  Say N if unsure.  | 
|---|
| 431 |  | -  | 
|---|
| 432 | 505 |  config BLK_DEV_IO_TRACE | 
|---|
| 433 | 506 |  	bool "Support for tracing block IO actions" | 
|---|
| 434 | 507 |  	depends on SYSFS | 
|---|
| .. | .. | 
|---|
| 460 | 533 |  	bool "Enable kprobes-based dynamic events" | 
|---|
| 461 | 534 |  	select TRACING | 
|---|
| 462 | 535 |  	select PROBE_EVENTS | 
|---|
 | 536 | +	select DYNAMIC_EVENTS  | 
|---|
| 463 | 537 |  	default y | 
|---|
| 464 | 538 |  	help | 
|---|
| 465 | 539 |  	  This allows the user to add tracing events (similar to tracepoints) | 
|---|
| .. | .. | 
|---|
| 499 | 573 |  	depends on PERF_EVENTS | 
|---|
| 500 | 574 |  	select UPROBES | 
|---|
| 501 | 575 |  	select PROBE_EVENTS | 
|---|
 | 576 | +	select DYNAMIC_EVENTS  | 
|---|
| 502 | 577 |  	select TRACING | 
|---|
| 503 | 578 |  	default y | 
|---|
| 504 | 579 |  	help | 
|---|
| .. | .. | 
|---|
| 515 | 590 |  	bool | 
|---|
| 516 | 591 |  	default y | 
|---|
| 517 | 592 |  	help | 
|---|
| 518 |  | -	  This allows the user to attach BPF programs to kprobe events.  | 
|---|
 | 593 | +	  This allows the user to attach BPF programs to kprobe, uprobe, and  | 
|---|
 | 594 | +	  tracepoint events.  | 
|---|
 | 595 | +  | 
|---|
 | 596 | +config DYNAMIC_EVENTS  | 
|---|
 | 597 | +	def_bool n  | 
|---|
| 519 | 598 |   | 
|---|
| 520 | 599 |  config PROBE_EVENTS | 
|---|
| 521 | 600 |  	def_bool n | 
|---|
| 522 |  | -  | 
|---|
| 523 |  | -config DYNAMIC_FTRACE  | 
|---|
| 524 |  | -	bool "enable/disable function tracing dynamically"  | 
|---|
| 525 |  | -	depends on FUNCTION_TRACER  | 
|---|
| 526 |  | -	depends on HAVE_DYNAMIC_FTRACE  | 
|---|
| 527 |  | -	default y  | 
|---|
| 528 |  | -	help  | 
|---|
| 529 |  | -	  This option will modify all the calls to function tracing  | 
|---|
| 530 |  | -	  dynamically (will patch them out of the binary image and  | 
|---|
| 531 |  | -	  replace them with a No-Op instruction) on boot up. During  | 
|---|
| 532 |  | -	  compile time, a table is made of all the locations that ftrace  | 
|---|
| 533 |  | -	  can function trace, and this table is linked into the kernel  | 
|---|
| 534 |  | -	  image. When this is enabled, functions can be individually  | 
|---|
| 535 |  | -	  enabled, and the functions not enabled will not affect  | 
|---|
| 536 |  | -	  performance of the system.  | 
|---|
| 537 |  | -  | 
|---|
| 538 |  | -	  See the files in /sys/kernel/debug/tracing:  | 
|---|
| 539 |  | -	    available_filter_functions  | 
|---|
| 540 |  | -	    set_ftrace_filter  | 
|---|
| 541 |  | -	    set_ftrace_notrace  | 
|---|
| 542 |  | -  | 
|---|
| 543 |  | -	  This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but  | 
|---|
| 544 |  | -	  otherwise has native performance as long as no tracing is active.  | 
|---|
| 545 |  | -  | 
|---|
| 546 |  | -config DYNAMIC_FTRACE_WITH_REGS  | 
|---|
| 547 |  | -	def_bool y  | 
|---|
| 548 |  | -	depends on DYNAMIC_FTRACE  | 
|---|
| 549 |  | -	depends on HAVE_DYNAMIC_FTRACE_WITH_REGS  | 
|---|
| 550 |  | -  | 
|---|
| 551 |  | -config FUNCTION_PROFILER  | 
|---|
| 552 |  | -	bool "Kernel function profiler"  | 
|---|
| 553 |  | -	depends on FUNCTION_TRACER  | 
|---|
| 554 |  | -	default n  | 
|---|
| 555 |  | -	help  | 
|---|
| 556 |  | -	  This option enables the kernel function profiler. A file is created  | 
|---|
| 557 |  | -	  in debugfs called function_profile_enabled which defaults to zero.  | 
|---|
| 558 |  | -	  When a 1 is echoed into this file profiling begins, and when a  | 
|---|
| 559 |  | -	  zero is entered, profiling stops. A "functions" file is created in  | 
|---|
| 560 |  | -	  the trace_stat directory; this file shows the list of functions that  | 
|---|
| 561 |  | -	  have been hit and their counters.  | 
|---|
| 562 |  | -  | 
|---|
| 563 |  | -	  If in doubt, say N.  | 
|---|
| 564 | 601 |   | 
|---|
| 565 | 602 |  config BPF_KPROBE_OVERRIDE | 
|---|
| 566 | 603 |  	bool "Enable BPF programs to override a kprobed function" | 
|---|
| .. | .. | 
|---|
| 576 | 613 |  	depends on DYNAMIC_FTRACE | 
|---|
| 577 | 614 |  	depends on HAVE_FTRACE_MCOUNT_RECORD | 
|---|
| 578 | 615 |   | 
|---|
| 579 |  | -config FTRACE_SELFTEST  | 
|---|
 | 616 | +config FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY  | 
|---|
| 580 | 617 |  	bool | 
|---|
 | 618 | +	depends on FTRACE_MCOUNT_RECORD  | 
|---|
| 581 | 619 |   | 
|---|
| 582 |  | -config FTRACE_STARTUP_TEST  | 
|---|
| 583 |  | -	bool "Perform a startup test on ftrace"  | 
|---|
| 584 |  | -	depends on GENERIC_TRACER  | 
|---|
| 585 |  | -	select FTRACE_SELFTEST  | 
|---|
| 586 |  | -	help  | 
|---|
| 587 |  | -	  This option performs a series of startup tests on ftrace. On bootup  | 
|---|
| 588 |  | -	  a series of tests are made to verify that the tracer is  | 
|---|
| 589 |  | -	  functioning properly. It will do tests on all the configured  | 
|---|
| 590 |  | -	  tracers of ftrace.  | 
|---|
 | 620 | +config FTRACE_MCOUNT_USE_CC  | 
|---|
 | 621 | +	def_bool y  | 
|---|
 | 622 | +	depends on $(cc-option,-mrecord-mcount)  | 
|---|
 | 623 | +	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY  | 
|---|
 | 624 | +	depends on FTRACE_MCOUNT_RECORD  | 
|---|
| 591 | 625 |   | 
|---|
| 592 |  | -config EVENT_TRACE_TEST_SYSCALLS  | 
|---|
| 593 |  | -	bool "Run selftest on syscall events"  | 
|---|
| 594 |  | -	depends on FTRACE_STARTUP_TEST  | 
|---|
| 595 |  | -	help  | 
|---|
| 596 |  | -	 This option will also enable testing every syscall event.  | 
|---|
| 597 |  | -	 It only enables the event and disables it and runs various loads  | 
|---|
| 598 |  | -	 with the event enabled. This adds a bit more time for kernel boot  | 
|---|
| 599 |  | -	 up since it runs this on every system call defined.  | 
|---|
 | 626 | +config FTRACE_MCOUNT_USE_OBJTOOL  | 
|---|
 | 627 | +	def_bool y  | 
|---|
 | 628 | +	depends on HAVE_OBJTOOL_MCOUNT  | 
|---|
 | 629 | +	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY  | 
|---|
 | 630 | +	depends on !FTRACE_MCOUNT_USE_CC  | 
|---|
 | 631 | +	depends on FTRACE_MCOUNT_RECORD  | 
|---|
| 600 | 632 |   | 
|---|
| 601 |  | -	 TBD - enable a way to actually call the syscalls as we test their  | 
|---|
| 602 |  | -	       events  | 
|---|
| 603 |  | -  | 
|---|
| 604 |  | -config MMIOTRACE  | 
|---|
| 605 |  | -	bool "Memory mapped IO tracing"  | 
|---|
| 606 |  | -	depends on HAVE_MMIOTRACE_SUPPORT && PCI  | 
|---|
| 607 |  | -	select GENERIC_TRACER  | 
|---|
| 608 |  | -	help  | 
|---|
| 609 |  | -	  Mmiotrace traces Memory Mapped I/O access and is meant for  | 
|---|
| 610 |  | -	  debugging and reverse engineering. It is called from the ioremap  | 
|---|
| 611 |  | -	  implementation and works via page faults. Tracing is disabled by  | 
|---|
| 612 |  | -	  default and can be enabled at run-time.  | 
|---|
| 613 |  | -  | 
|---|
| 614 |  | -	  See Documentation/trace/mmiotrace.rst.  | 
|---|
| 615 |  | -	  If you are not helping to develop drivers, say N.  | 
|---|
 | 633 | +config FTRACE_MCOUNT_USE_RECORDMCOUNT  | 
|---|
 | 634 | +	def_bool y  | 
|---|
 | 635 | +	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY  | 
|---|
 | 636 | +	depends on !FTRACE_MCOUNT_USE_CC  | 
|---|
 | 637 | +	depends on !FTRACE_MCOUNT_USE_OBJTOOL  | 
|---|
 | 638 | +	depends on FTRACE_MCOUNT_RECORD  | 
|---|
| 616 | 639 |   | 
|---|
| 617 | 640 |  config TRACING_MAP | 
|---|
| 618 | 641 |  	bool | 
|---|
| .. | .. | 
|---|
| 624 | 647 |  	  generally used outside of that context, and is normally | 
|---|
| 625 | 648 |  	  selected by tracers that use it. | 
|---|
| 626 | 649 |   | 
|---|
 | 650 | +config SYNTH_EVENTS  | 
|---|
 | 651 | +	bool "Synthetic trace events"  | 
|---|
 | 652 | +	select TRACING  | 
|---|
 | 653 | +	select DYNAMIC_EVENTS  | 
|---|
 | 654 | +	default n  | 
|---|
 | 655 | +	help  | 
|---|
 | 656 | +	  Synthetic events are user-defined trace events that can be  | 
|---|
 | 657 | +	  used to combine data from other trace events or in fact any  | 
|---|
 | 658 | +	  data source.  Synthetic events can be generated indirectly  | 
|---|
 | 659 | +	  via the trace() action of histogram triggers or directly  | 
|---|
 | 660 | +	  by way of an in-kernel API.  | 
|---|
 | 661 | +  | 
|---|
 | 662 | +	  See Documentation/trace/events.rst or  | 
|---|
 | 663 | +	  Documentation/trace/histogram.rst for details and examples.  | 
|---|
 | 664 | +  | 
|---|
 | 665 | +	  If in doubt, say N.  | 
|---|
 | 666 | +  | 
|---|
| 627 | 667 |  config HIST_TRIGGERS | 
|---|
| 628 | 668 |  	bool "Histogram triggers" | 
|---|
| 629 | 669 |  	depends on ARCH_HAVE_NMI_SAFE_CMPXCHG | 
|---|
| 630 | 670 |  	select TRACING_MAP | 
|---|
| 631 | 671 |  	select TRACING | 
|---|
 | 672 | +	select DYNAMIC_EVENTS  | 
|---|
 | 673 | +	select SYNTH_EVENTS  | 
|---|
| 632 | 674 |  	default n | 
|---|
| 633 | 675 |  	help | 
|---|
| 634 | 676 |  	  Hist triggers allow one or more arbitrary trace event fields | 
|---|
| .. | .. | 
|---|
| 644 | 686 |  	  See Documentation/trace/histogram.rst. | 
|---|
| 645 | 687 |  	  If in doubt, say N. | 
|---|
| 646 | 688 |   | 
|---|
| 647 |  | -config MMIOTRACE_TEST  | 
|---|
| 648 |  | -	tristate "Test module for mmiotrace"  | 
|---|
| 649 |  | -	depends on MMIOTRACE && m  | 
|---|
 | 689 | +config TRACE_EVENT_INJECT  | 
|---|
 | 690 | +	bool "Trace event injection"  | 
|---|
 | 691 | +	depends on TRACING  | 
|---|
| 650 | 692 |  	help | 
|---|
| 651 |  | -	  This is a dumb module for testing mmiotrace. It is very dangerous  | 
|---|
| 652 |  | -	  as it will write garbage to IO memory starting at a given address.  | 
|---|
| 653 |  | -	  However, it should be safe to use on e.g. unused portion of VRAM.  | 
|---|
 | 693 | +	  Allow user-space to inject a specific trace event into the ring  | 
|---|
 | 694 | +	  buffer. This is mainly used for testing purpose.  | 
|---|
| 654 | 695 |   | 
|---|
| 655 |  | -	  Say N, unless you absolutely know what you are doing.  | 
|---|
 | 696 | +	  If unsure, say N.  | 
|---|
| 656 | 697 |   | 
|---|
| 657 | 698 |  config TRACEPOINT_BENCHMARK | 
|---|
| 658 |  | -        bool "Add tracepoint that benchmarks tracepoints"  | 
|---|
 | 699 | +	bool "Add tracepoint that benchmarks tracepoints"  | 
|---|
| 659 | 700 |  	help | 
|---|
| 660 | 701 |  	 This option creates the tracepoint "benchmark:benchmark_event". | 
|---|
| 661 | 702 |  	 When the tracepoint is enabled, it kicks off a kernel thread that | 
|---|
| .. | .. | 
|---|
| 700 | 741 |   | 
|---|
| 701 | 742 |  	  If unsure, say N. | 
|---|
| 702 | 743 |   | 
|---|
| 703 |  | -config RING_BUFFER_STARTUP_TEST  | 
|---|
| 704 |  | -       bool "Ring buffer startup self test"  | 
|---|
| 705 |  | -       depends on RING_BUFFER  | 
|---|
| 706 |  | -       help  | 
|---|
| 707 |  | -         Run a simple self test on the ring buffer on boot up. Late in the  | 
|---|
| 708 |  | -	 kernel boot sequence, the test will start that kicks off  | 
|---|
| 709 |  | -	 a thread per cpu. Each thread will write various size events  | 
|---|
| 710 |  | -	 into the ring buffer. Another thread is created to send IPIs  | 
|---|
| 711 |  | -	 to each of the threads, where the IPI handler will also write  | 
|---|
| 712 |  | -	 to the ring buffer, to test/stress the nesting ability.  | 
|---|
| 713 |  | -	 If any anomalies are discovered, a warning will be displayed  | 
|---|
| 714 |  | -	 and all ring buffers will be disabled.  | 
|---|
| 715 |  | -  | 
|---|
| 716 |  | -	 The test runs for 10 seconds. This will slow your boot time  | 
|---|
| 717 |  | -	 by at least 10 more seconds.  | 
|---|
| 718 |  | -  | 
|---|
| 719 |  | -	 At the end of the test, statics and more checks are done.  | 
|---|
| 720 |  | -	 It will output the stats of each per cpu buffer. What  | 
|---|
| 721 |  | -	 was written, the sizes, what was read, what was lost, and  | 
|---|
| 722 |  | -	 other similar details.  | 
|---|
| 723 |  | -  | 
|---|
| 724 |  | -	 If unsure, say N  | 
|---|
| 725 |  | -  | 
|---|
| 726 |  | -config PREEMPTIRQ_DELAY_TEST  | 
|---|
| 727 |  | -	tristate "Preempt / IRQ disable delay thread to test latency tracers"  | 
|---|
| 728 |  | -	depends on m  | 
|---|
| 729 |  | -	help  | 
|---|
| 730 |  | -	  Select this option to build a test module that can help test latency  | 
|---|
| 731 |  | -	  tracers by executing a preempt or irq disable section with a user  | 
|---|
| 732 |  | -	  configurable delay. The module busy waits for the duration of the  | 
|---|
| 733 |  | -	  critical section.  | 
|---|
| 734 |  | -  | 
|---|
| 735 |  | -	  For example, the following invocation forces a one-time irq-disabled  | 
|---|
| 736 |  | -	  critical section for 500us:  | 
|---|
| 737 |  | -	  modprobe preemptirq_delay_test test_mode=irq delay=500000  | 
|---|
| 738 |  | -  | 
|---|
| 739 |  | -	  If unsure, say N  | 
|---|
| 740 |  | -  | 
|---|
| 741 | 744 |  config TRACE_EVAL_MAP_FILE | 
|---|
| 742 | 745 |         bool "Show eval mappings for trace events" | 
|---|
| 743 | 746 |         depends on TRACING | 
|---|
| 744 | 747 |         help | 
|---|
| 745 | 748 |  	The "print fmt" of the trace events will show the enum/sizeof names | 
|---|
| 746 |  | -	instead	of their values. This can cause problems for user space tools  | 
|---|
 | 749 | +	instead of their values. This can cause problems for user space tools  | 
|---|
| 747 | 750 |  	that use this string to parse the raw data as user space does not know | 
|---|
| 748 | 751 |  	how to convert the string to its value. | 
|---|
| 749 | 752 |   | 
|---|
| .. | .. | 
|---|
| 764 | 767 |  	they are needed for the "eval_map" file. Enabling this option will | 
|---|
| 765 | 768 |  	increase the memory footprint of the running kernel. | 
|---|
| 766 | 769 |   | 
|---|
| 767 |  | -	If unsure, say N  | 
|---|
| 768 |  | -  | 
|---|
| 769 |  | -config TRACING_EVENTS_GPIO  | 
|---|
| 770 |  | -	bool "Trace gpio events"  | 
|---|
| 771 |  | -	depends on GPIOLIB  | 
|---|
| 772 |  | -	default y  | 
|---|
| 773 |  | -	help  | 
|---|
| 774 |  | -	  Enable tracing events for gpio subsystem  | 
|---|
 | 770 | +	If unsure, say N.  | 
|---|
| 775 | 771 |   | 
|---|
| 776 | 772 |  config GCOV_PROFILE_FTRACE | 
|---|
| 777 | 773 |  	bool "Enable GCOV profiling on ftrace subsystem" | 
|---|
| .. | .. | 
|---|
| 785 | 781 |  	  Note that on a kernel compiled with this config, ftrace will | 
|---|
| 786 | 782 |  	  run significantly slower. | 
|---|
| 787 | 783 |   | 
|---|
 | 784 | +config FTRACE_SELFTEST  | 
|---|
 | 785 | +	bool  | 
|---|
 | 786 | +  | 
|---|
 | 787 | +config FTRACE_STARTUP_TEST  | 
|---|
 | 788 | +	bool "Perform a startup test on ftrace"  | 
|---|
 | 789 | +	depends on GENERIC_TRACER  | 
|---|
 | 790 | +	select FTRACE_SELFTEST  | 
|---|
 | 791 | +	help  | 
|---|
 | 792 | +	  This option performs a series of startup tests on ftrace. On bootup  | 
|---|
 | 793 | +	  a series of tests are made to verify that the tracer is  | 
|---|
 | 794 | +	  functioning properly. It will do tests on all the configured  | 
|---|
 | 795 | +	  tracers of ftrace.  | 
|---|
 | 796 | +  | 
|---|
 | 797 | +config EVENT_TRACE_STARTUP_TEST  | 
|---|
 | 798 | +	bool "Run selftest on trace events"  | 
|---|
 | 799 | +	depends on FTRACE_STARTUP_TEST  | 
|---|
 | 800 | +	default y  | 
|---|
 | 801 | +	help  | 
|---|
 | 802 | +	  This option performs a test on all trace events in the system.  | 
|---|
 | 803 | +	  It basically just enables each event and runs some code that  | 
|---|
 | 804 | +	  will trigger events (not necessarily the event it enables)  | 
|---|
 | 805 | +	  This may take some time run as there are a lot of events.  | 
|---|
 | 806 | +  | 
|---|
 | 807 | +config EVENT_TRACE_TEST_SYSCALLS  | 
|---|
 | 808 | +	bool "Run selftest on syscall events"  | 
|---|
 | 809 | +	depends on EVENT_TRACE_STARTUP_TEST  | 
|---|
 | 810 | +	help  | 
|---|
 | 811 | +	 This option will also enable testing every syscall event.  | 
|---|
 | 812 | +	 It only enables the event and disables it and runs various loads  | 
|---|
 | 813 | +	 with the event enabled. This adds a bit more time for kernel boot  | 
|---|
 | 814 | +	 up since it runs this on every system call defined.  | 
|---|
 | 815 | +  | 
|---|
 | 816 | +	 TBD - enable a way to actually call the syscalls as we test their  | 
|---|
 | 817 | +	       events  | 
|---|
 | 818 | +  | 
|---|
 | 819 | +config RING_BUFFER_STARTUP_TEST  | 
|---|
 | 820 | +       bool "Ring buffer startup self test"  | 
|---|
 | 821 | +       depends on RING_BUFFER  | 
|---|
 | 822 | +       help  | 
|---|
 | 823 | +	 Run a simple self test on the ring buffer on boot up. Late in the  | 
|---|
 | 824 | +	 kernel boot sequence, the test will start that kicks off  | 
|---|
 | 825 | +	 a thread per cpu. Each thread will write various size events  | 
|---|
 | 826 | +	 into the ring buffer. Another thread is created to send IPIs  | 
|---|
 | 827 | +	 to each of the threads, where the IPI handler will also write  | 
|---|
 | 828 | +	 to the ring buffer, to test/stress the nesting ability.  | 
|---|
 | 829 | +	 If any anomalies are discovered, a warning will be displayed  | 
|---|
 | 830 | +	 and all ring buffers will be disabled.  | 
|---|
 | 831 | +  | 
|---|
 | 832 | +	 The test runs for 10 seconds. This will slow your boot time  | 
|---|
 | 833 | +	 by at least 10 more seconds.  | 
|---|
 | 834 | +  | 
|---|
 | 835 | +	 At the end of the test, statics and more checks are done.  | 
|---|
 | 836 | +	 It will output the stats of each per cpu buffer. What  | 
|---|
 | 837 | +	 was written, the sizes, what was read, what was lost, and  | 
|---|
 | 838 | +	 other similar details.  | 
|---|
 | 839 | +  | 
|---|
 | 840 | +	 If unsure, say N  | 
|---|
 | 841 | +  | 
|---|
 | 842 | +config MMIOTRACE_TEST  | 
|---|
 | 843 | +	tristate "Test module for mmiotrace"  | 
|---|
 | 844 | +	depends on MMIOTRACE && m  | 
|---|
 | 845 | +	help  | 
|---|
 | 846 | +	  This is a dumb module for testing mmiotrace. It is very dangerous  | 
|---|
 | 847 | +	  as it will write garbage to IO memory starting at a given address.  | 
|---|
 | 848 | +	  However, it should be safe to use on e.g. unused portion of VRAM.  | 
|---|
 | 849 | +  | 
|---|
 | 850 | +	  Say N, unless you absolutely know what you are doing.  | 
|---|
 | 851 | +  | 
|---|
 | 852 | +config PREEMPTIRQ_DELAY_TEST  | 
|---|
 | 853 | +	tristate "Test module to create a preempt / IRQ disable delay thread to test latency tracers"  | 
|---|
 | 854 | +	depends on m  | 
|---|
 | 855 | +	help  | 
|---|
 | 856 | +	  Select this option to build a test module that can help test latency  | 
|---|
 | 857 | +	  tracers by executing a preempt or irq disable section with a user  | 
|---|
 | 858 | +	  configurable delay. The module busy waits for the duration of the  | 
|---|
 | 859 | +	  critical section.  | 
|---|
 | 860 | +  | 
|---|
 | 861 | +	  For example, the following invocation generates a burst of three  | 
|---|
 | 862 | +	  irq-disabled critical sections for 500us:  | 
|---|
 | 863 | +	  modprobe preemptirq_delay_test test_mode=irq delay=500 burst_size=3  | 
|---|
 | 864 | +  | 
|---|
 | 865 | +	  If unsure, say N  | 
|---|
 | 866 | +  | 
|---|
 | 867 | +config SYNTH_EVENT_GEN_TEST  | 
|---|
 | 868 | +	tristate "Test module for in-kernel synthetic event generation"  | 
|---|
 | 869 | +	depends on SYNTH_EVENTS  | 
|---|
 | 870 | +	help  | 
|---|
 | 871 | +          This option creates a test module to check the base  | 
|---|
 | 872 | +          functionality of in-kernel synthetic event definition and  | 
|---|
 | 873 | +          generation.  | 
|---|
 | 874 | +  | 
|---|
 | 875 | +          To test, insert the module, and then check the trace buffer  | 
|---|
 | 876 | +	  for the generated sample events.  | 
|---|
 | 877 | +  | 
|---|
 | 878 | +	  If unsure, say N.  | 
|---|
 | 879 | +  | 
|---|
 | 880 | +config KPROBE_EVENT_GEN_TEST  | 
|---|
 | 881 | +	tristate "Test module for in-kernel kprobe event generation"  | 
|---|
 | 882 | +	depends on KPROBE_EVENTS  | 
|---|
 | 883 | +	help  | 
|---|
 | 884 | +          This option creates a test module to check the base  | 
|---|
 | 885 | +          functionality of in-kernel kprobe event definition.  | 
|---|
 | 886 | +  | 
|---|
 | 887 | +          To test, insert the module, and then check the trace buffer  | 
|---|
 | 888 | +	  for the generated kprobe events.  | 
|---|
 | 889 | +  | 
|---|
 | 890 | +	  If unsure, say N.  | 
|---|
 | 891 | +  | 
|---|
 | 892 | +config HIST_TRIGGERS_DEBUG  | 
|---|
 | 893 | +	bool "Hist trigger debug support"  | 
|---|
 | 894 | +	depends on HIST_TRIGGERS  | 
|---|
 | 895 | +	help  | 
|---|
 | 896 | +          Add "hist_debug" file for each event, which when read will  | 
|---|
 | 897 | +          dump out a bunch of internal details about the hist triggers  | 
|---|
 | 898 | +          defined on that event.  | 
|---|
 | 899 | +  | 
|---|
 | 900 | +          The hist_debug file serves a couple of purposes:  | 
|---|
 | 901 | +  | 
|---|
 | 902 | +            - Helps developers verify that nothing is broken.  | 
|---|
 | 903 | +  | 
|---|
 | 904 | +            - Provides educational information to support the details  | 
|---|
 | 905 | +              of the hist trigger internals as described by  | 
|---|
 | 906 | +              Documentation/trace/histogram-design.rst.  | 
|---|
 | 907 | +  | 
|---|
 | 908 | +          The hist_debug output only covers the data structures  | 
|---|
 | 909 | +          related to the histogram definitions themselves and doesn't  | 
|---|
 | 910 | +          display the internals of map buckets or variable values of  | 
|---|
 | 911 | +          running histograms.  | 
|---|
 | 912 | +  | 
|---|
 | 913 | +          If unsure, say N.  | 
|---|
 | 914 | +  | 
|---|
| 788 | 915 |  endif # FTRACE | 
|---|
| 789 | 916 |   | 
|---|
| 790 | 917 |  endif # TRACING_SUPPORT | 
|---|