Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) # Architectures that offer an FUNCTION_TRACER implementation should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #  select HAVE_FUNCTION_TRACER:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) config USER_STACKTRACE_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) config NOP_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) config HAVE_FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	  See Documentation/trace/ftrace-design.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) config HAVE_FUNCTION_GRAPH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	  See Documentation/trace/ftrace-design.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) config HAVE_DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	  See Documentation/trace/ftrace-design.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) config HAVE_DYNAMIC_FTRACE_WITH_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) config HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) config HAVE_FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	  See Documentation/trace/ftrace-design.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) config HAVE_SYSCALL_TRACEPOINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	  See Documentation/trace/ftrace-design.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) config HAVE_FENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	  Arch supports the gcc options -pg with -mfentry
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) config HAVE_NOP_MCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	  Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) config HAVE_OBJTOOL_MCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	  Arch supports objtool --mcount
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) config HAVE_C_RECORDMCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	  C version of recordmcount available?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) config TRACER_MAX_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) config TRACE_CLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) config RING_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	select TRACE_CLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	select IRQ_WORK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) config EVENT_TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	select CONTEXT_SWITCH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	select GLOB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) config CONTEXT_SWITCH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) config RING_BUFFER_ALLOW_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	 Allow the use of ring_buffer_swap_cpu.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	 Adds a very slight overhead to tracing when enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) config TRACE_MMIO_ACCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	bool "Register read/write tracing"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	depends on TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	depends on ARM64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	  Create tracepoints for IO read/write operations. These trace events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	  can be used for logging all MMIO read/write operations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) config PREEMPTIRQ_TRACEPOINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	depends on TRACE_PREEMPT_TOGGLE || TRACE_IRQFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	  Create preempt/irq toggle tracepoints if needed, so that other parts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	  of the kernel can use them to generate or add hooks to them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) menuconfig TRACEFS_DISABLE_AUTOMOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	bool "Do not autmount tracefs in the debugfs filesystem"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	  Provides an option to not automount tracefs in /sys/kernel/debug/tracing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) # All tracer options should select GENERIC_TRACER. For those options that are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) # enabled by all tracers (context switch and event tracer) they select TRACING.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) # This allows those options to appear when no other tracer is selected. But the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) # options do not appear when something else selects it. We need the two options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) # GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) # hiding of the automatic options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) config TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	select RING_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	select STACKTRACE if STACKTRACE_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	select TRACEPOINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	select NOP_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	select BINARY_PRINTF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	select EVENT_TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	select TRACE_CLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) config GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) # Minimum requirements an architecture has to meet for us to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) # be able to offer generic tracing facilities:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) config TRACING_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	depends on TRACE_IRQFLAGS_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	depends on STACKTRACE_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) if TRACING_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) menuconfig FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	bool "Tracers"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	default y if DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	  Enable the kernel tracing infrastructure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) if FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) config BOOTTIME_TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	bool "Boot-time Tracing support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	depends on TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	select BOOT_CONFIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	  Enable developer to setup ftrace subsystem via supplemental
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	  kernel cmdline at boot time for debugging (tracing) driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	  initialization and boot process.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) config FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	bool "Kernel Function Tracer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	depends on HAVE_FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	select KALLSYMS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	select CONTEXT_SWITCH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	select GLOB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	select TASKS_RCU if PREEMPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	select TASKS_RUDE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	  Enable the kernel to trace every kernel function. This is done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	  by using a compiler feature to insert a small, 5-byte No-Operation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	  instruction at the beginning of every kernel function, which NOP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	  sequence is then dynamically patched into a tracer call when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	  tracing is enabled by the administrator. If it's runtime disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	  (the bootup default), then the overhead of the instructions is very
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	  small and not measurable even in micro-benchmarks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) config FUNCTION_GRAPH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	bool "Kernel Function Graph Tracer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	depends on HAVE_FUNCTION_GRAPH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	depends on FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	  Enable the kernel to trace a function at both its return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	  and its entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	  Its first purpose is to trace the duration of functions and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	  draw a call graph for each thread with some information like
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	  the return value. This is done by setting the current return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	  address on the current task structure into a stack of calls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) config DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	bool "enable/disable function tracing dynamically"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	depends on FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	depends on HAVE_DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	  This option will modify all the calls to function tracing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	  dynamically (will patch them out of the binary image and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	  replace them with a No-Op instruction) on boot up. During
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	  compile time, a table is made of all the locations that ftrace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	  can function trace, and this table is linked into the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	  image. When this is enabled, functions can be individually
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	  enabled, and the functions not enabled will not affect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	  performance of the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	  See the files in /sys/kernel/debug/tracing:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	    available_filter_functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	    set_ftrace_filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	    set_ftrace_notrace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	  This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	  otherwise has native performance as long as no tracing is active.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) config DYNAMIC_FTRACE_WITH_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	depends on DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	depends on HAVE_DYNAMIC_FTRACE_WITH_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) config DYNAMIC_FTRACE_WITH_DIRECT_CALLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	depends on DYNAMIC_FTRACE_WITH_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) config FUNCTION_PROFILER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	bool "Kernel function profiler"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	depends on FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	  This option enables the kernel function profiler. A file is created
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	  in debugfs called function_profile_enabled which defaults to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	  When a 1 is echoed into this file profiling begins, and when a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	  zero is entered, profiling stops. A "functions" file is created in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	  the trace_stat directory; this file shows the list of functions that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	  have been hit and their counters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	  If in doubt, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) config STACK_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	bool "Trace max stack"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	depends on HAVE_FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	select FUNCTION_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	select STACKTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	select KALLSYMS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	  This special tracer records the maximum stack footprint of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	  kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	  This tracer works by hooking into every function call that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	  kernel executes, and keeping a maximum stack depth value and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	  stack-trace saved.  If this is configured with DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	  then it will not have any overhead while the stack tracer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	  is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	  To enable the stack tracer on bootup, pass in 'stacktrace'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	  on the kernel command line.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	  The stack tracer can also be enabled or disabled via the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	  sysctl kernel.stack_tracer_enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	  Say N if unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) config TRACE_PREEMPT_TOGGLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	  Enables hooks which will be called when preemption is first disabled,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	  and last enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) config IRQSOFF_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	bool "Interrupts-off Latency Tracer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	depends on TRACE_IRQFLAGS_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	depends on !ARCH_USES_GETTIMEOFFSET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	select TRACE_IRQFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	select TRACER_MAX_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	select RING_BUFFER_ALLOW_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	select TRACER_SNAPSHOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	select TRACER_SNAPSHOT_PER_CPU_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	  This option measures the time spent in irqs-off critical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 	  sections, with microsecond accuracy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	  The default measurement method is a maximum search, which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	  disabled by default and can be runtime (re-)started
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	  via:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	      echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	  (Note that kernel size and overhead increase with this option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	  enabled. This option and the preempt-off timing option can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	  used together or separately.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) config PREEMPT_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	bool "Preemption-off Latency Tracer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	depends on !ARCH_USES_GETTIMEOFFSET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	depends on PREEMPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 	select TRACER_MAX_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	select RING_BUFFER_ALLOW_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	select TRACER_SNAPSHOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	select TRACER_SNAPSHOT_PER_CPU_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	select TRACE_PREEMPT_TOGGLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 	  This option measures the time spent in preemption-off critical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	  sections, with microsecond accuracy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	  The default measurement method is a maximum search, which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	  disabled by default and can be runtime (re-)started
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 	  via:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	      echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	  (Note that kernel size and overhead increase with this option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	  enabled. This option and the irqs-off timing option can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 	  used together or separately.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) config SCHED_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	bool "Scheduling Latency Tracer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	select CONTEXT_SWITCH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	select TRACER_MAX_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	select TRACER_SNAPSHOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	  This tracer tracks the latency of the highest priority task
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	  to be scheduled in, starting from the point it has woken up.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) config HWLAT_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	bool "Tracer to detect hardware latencies (like SMIs)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	 This tracer, when enabled will create one or more kernel threads,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	 depending on what the cpumask file is set to, which each thread
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	 spinning in a loop looking for interruptions caused by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 	 something other than the kernel. For example, if a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	 System Management Interrupt (SMI) takes a noticeable amount of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 	 time, this tracer will detect it. This is useful for testing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 	 if a system is reliable for Real Time tasks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 	 Some files are created in the tracing directory when this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	 is enabled:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	   hwlat_detector/width   - time in usecs for how long to spin for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 	   hwlat_detector/window  - time in usecs between the start of each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 				     iteration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	 A kernel thread is created that will spin with interrupts disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	 for "width" microseconds in every "window" cycle. It will not spin
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 	 for "window - width" microseconds, where the system can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	 continue to operate.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 	 The output will appear in the trace and trace_pipe files.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	 When the tracer is not running, it has no affect on the system,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 	 but when it is running, it can cause the system to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 	 periodically non responsive. Do not run this tracer on a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 	 production system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) 	 To enable this tracer, echo in "hwlat" into the current_tracer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 	 file. Every time a latency is greater than tracing_thresh, it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) 	 be recorded into the ring buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) config MMIOTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 	bool "Memory mapped IO tracing"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 	depends on HAVE_MMIOTRACE_SUPPORT && PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 	  Mmiotrace traces Memory Mapped I/O access and is meant for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 	  debugging and reverse engineering. It is called from the ioremap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 	  implementation and works via page faults. Tracing is disabled by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 	  default and can be enabled at run-time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 	  See Documentation/trace/mmiotrace.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 	  If you are not helping to develop drivers, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) config ENABLE_DEFAULT_TRACERS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 	bool "Trace process context switches and events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 	depends on !GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 	  This tracer hooks to various trace points in the kernel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	  allowing the user to pick and choose which trace point they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 	  want to trace. It also includes the sched_switch tracer plugin.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) config FTRACE_SYSCALLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 	bool "Trace syscalls"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 	depends on HAVE_SYSCALL_TRACEPOINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	select KALLSYMS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 	  Basic tracer to catch the syscall entry and exit events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) config TRACER_SNAPSHOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) 	bool "Create a snapshot trace buffer"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 	select TRACER_MAX_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 	  Allow tracing users to take snapshot of the current buffer using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 	  ftrace interface, e.g.:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 	      echo 1 > /sys/kernel/debug/tracing/snapshot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 	      cat snapshot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) config TRACER_SNAPSHOT_PER_CPU_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	bool "Allow snapshot to swap per CPU"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 	depends on TRACER_SNAPSHOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 	select RING_BUFFER_ALLOW_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 	  Allow doing a snapshot of a single CPU buffer instead of a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	  full swap (all buffers). If this is set, then the following is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) 	  allowed:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 	      echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 	  After which, only the tracing buffer for CPU 2 was swapped with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 	  the main tracing buffer, and the other CPU buffers remain the same.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 	  When this is enabled, this adds a little more overhead to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 	  trace recording, as it needs to add some checks to synchronize
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 	  recording with swaps. But this does not affect the performance
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 	  of the overall system. This is enabled by default when the preempt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) 	  or irq latency tracers are enabled, as those need to swap as well
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) 	  and already adds the overhead (plus a lot more).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) config TRACE_BRANCH_PROFILING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 	prompt "Branch Profiling"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) 	default BRANCH_PROFILE_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	 The branch profiling is a software profiler. It will add hooks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) 	 into the C conditionals to test which path a branch takes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 	 The likely/unlikely profiler only looks at the conditions that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 	 are annotated with a likely or unlikely macro.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 	 The "all branch" profiler will profile every if-statement in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	 kernel. This profiler will also enable the likely/unlikely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 	 profiler.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 	 Either of the above profilers adds a bit of overhead to the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 	 If unsure, choose "No branch profiling".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) config BRANCH_PROFILE_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) 	bool "No branch profiling"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 	  No branch profiling. Branch profiling adds a bit of overhead.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 	  Only enable it if you want to analyse the branching behavior.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 	  Otherwise keep it disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) config PROFILE_ANNOTATED_BRANCHES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 	bool "Trace likely/unlikely profiler"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 	select TRACE_BRANCH_PROFILING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 	  This tracer profiles all likely and unlikely macros
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) 	  in the kernel. It will display the results in:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 	  /sys/kernel/debug/tracing/trace_stat/branch_annotated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 	  Note: this will add a significant overhead; only turn this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 	  on if you need to profile the system's use of these macros.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) config PROFILE_ALL_BRANCHES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 	bool "Profile all if conditionals" if !FORTIFY_SOURCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) 	select TRACE_BRANCH_PROFILING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 	  This tracer profiles all branch conditions. Every if ()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) 	  taken in the kernel is recorded whether it hit or miss.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 	  The results will be displayed in:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 	  /sys/kernel/debug/tracing/trace_stat/branch_all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) 	  This option also enables the likely/unlikely profiler.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 	  This configuration, when enabled, will impose a great overhead
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 	  on the system. This should only be enabled when the system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) 	  is to be analyzed in much detail.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) config TRACING_BRANCHES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 	  Selected by tracers that will trace the likely and unlikely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 	  conditions. This prevents the tracers themselves from being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 	  profiled. Profiling the tracing infrastructure can only happen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) 	  when the likelys and unlikelys are not being traced.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) config BRANCH_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 	bool "Trace likely/unlikely instances"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) 	depends on TRACE_BRANCH_PROFILING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) 	select TRACING_BRANCHES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) 	  This traces the events of likely and unlikely condition
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) 	  calls in the kernel.  The difference between this and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) 	  "Trace likely/unlikely profiler" is that this is not a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 	  histogram of the callers, but actually places the calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) 	  events into a running trace buffer to see when and where the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) 	  events happened, as well as their results.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) 	  Say N if unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) config BLK_DEV_IO_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) 	bool "Support for tracing block IO actions"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) 	depends on SYSFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) 	depends on BLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) 	select RELAY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) 	select DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) 	select TRACEPOINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) 	select GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) 	select STACKTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) 	  Say Y here if you want to be able to trace the block layer actions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) 	  on a given queue. Tracing allows you to see any traffic happening
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) 	  on a block device queue. For more information (and the userspace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) 	  support tools needed), fetch the blktrace tools from:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) 	  git://git.kernel.dk/blktrace.git
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) 	  Tracing also is possible using the ftrace interface, e.g.:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) 	    echo 1 > /sys/block/sda/sda1/trace/enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) 	    echo blk > /sys/kernel/debug/tracing/current_tracer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) 	    cat /sys/kernel/debug/tracing/trace_pipe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) config KPROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) 	depends on KPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) 	depends on HAVE_REGS_AND_STACK_ACCESS_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) 	bool "Enable kprobes-based dynamic events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) 	select PROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 	select DYNAMIC_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) 	  This allows the user to add tracing events (similar to tracepoints)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) 	  on the fly via the ftrace interface. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) 	  Documentation/trace/kprobetrace.rst for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) 	  Those events can be inserted wherever kprobes can probe, and record
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) 	  various register and memory values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) 	  This option is also required by perf-probe subcommand of perf tools.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) 	  If you want to use perf tools, this option is strongly recommended.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) config KPROBE_EVENTS_ON_NOTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) 	bool "Do NOT protect notrace function from kprobe events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) 	depends on KPROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) 	depends on DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) 	  This is only for the developers who want to debug ftrace itself
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) 	  using kprobe events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) 	  If kprobes can use ftrace instead of breakpoint, ftrace related
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) 	  functions are protected from kprobe-events to prevent an infinit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) 	  recursion or any unexpected execution path which leads to a kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) 	  crash.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) 	  This option disables such protection and allows you to put kprobe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) 	  events on ftrace functions for debugging ftrace by itself.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) 	  Note that this might let you shoot yourself in the foot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) config UPROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) 	bool "Enable uprobes-based dynamic events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) 	depends on ARCH_SUPPORTS_UPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) 	depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) 	depends on PERF_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) 	select UPROBES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) 	select PROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) 	select DYNAMIC_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) 	  This allows the user to add tracing events on top of userspace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) 	  dynamic events (similar to tracepoints) on the fly via the trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) 	  events interface. Those events can be inserted wherever uprobes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) 	  can probe, and record various registers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) 	  This option is required if you plan to use perf-probe subcommand
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) 	  of perf tools on user space applications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) config BPF_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) 	depends on BPF_SYSCALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) 	depends on (KPROBE_EVENTS || UPROBE_EVENTS) && PERF_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) 	  This allows the user to attach BPF programs to kprobe, uprobe, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) 	  tracepoint events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) config DYNAMIC_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) 	def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) config PROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) 	def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) config BPF_KPROBE_OVERRIDE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) 	bool "Enable BPF programs to override a kprobed function"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) 	depends on BPF_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) 	depends on FUNCTION_ERROR_INJECTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) 	 Allows BPF to override the execution of a probed function and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) 	 set a different return value.  This is used for error injection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) config FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) 	depends on DYNAMIC_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) 	depends on HAVE_FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) config FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) 	depends on FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) config FTRACE_MCOUNT_USE_CC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) 	depends on $(cc-option,-mrecord-mcount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) 	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) 	depends on FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) config FTRACE_MCOUNT_USE_OBJTOOL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) 	depends on HAVE_OBJTOOL_MCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) 	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) 	depends on !FTRACE_MCOUNT_USE_CC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) 	depends on FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) config FTRACE_MCOUNT_USE_RECORDMCOUNT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) 	def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) 	depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) 	depends on !FTRACE_MCOUNT_USE_CC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) 	depends on !FTRACE_MCOUNT_USE_OBJTOOL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) 	depends on FTRACE_MCOUNT_RECORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) config TRACING_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) 	depends on ARCH_HAVE_NMI_SAFE_CMPXCHG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) 	  tracing_map is a special-purpose lock-free map for tracing,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) 	  separated out as a stand-alone facility in order to allow it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) 	  to be shared between multiple tracers.  It isn't meant to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) 	  generally used outside of that context, and is normally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) 	  selected by tracers that use it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) config SYNTH_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) 	bool "Synthetic trace events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) 	select DYNAMIC_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) 	  Synthetic events are user-defined trace events that can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) 	  used to combine data from other trace events or in fact any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) 	  data source.  Synthetic events can be generated indirectly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) 	  via the trace() action of histogram triggers or directly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) 	  by way of an in-kernel API.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) 	  See Documentation/trace/events.rst or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) 	  Documentation/trace/histogram.rst for details and examples.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) 	  If in doubt, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) config HIST_TRIGGERS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) 	bool "Histogram triggers"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) 	depends on ARCH_HAVE_NMI_SAFE_CMPXCHG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) 	select TRACING_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) 	select TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) 	select DYNAMIC_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) 	select SYNTH_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) 	  Hist triggers allow one or more arbitrary trace event fields
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) 	  to be aggregated into hash tables and dumped to stdout by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) 	  reading a debugfs/tracefs file.  They're useful for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) 	  gathering quick and dirty (though precise) summaries of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) 	  event activity as an initial guide for further investigation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) 	  using more advanced tools.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) 	  Inter-event tracing of quantities such as latencies is also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) 	  supported using hist triggers under this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) 	  See Documentation/trace/histogram.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) 	  If in doubt, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) config TRACE_EVENT_INJECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) 	bool "Trace event injection"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) 	depends on TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) 	  Allow user-space to inject a specific trace event into the ring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) 	  buffer. This is mainly used for testing purpose.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) config TRACEPOINT_BENCHMARK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) 	bool "Add tracepoint that benchmarks tracepoints"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) 	 This option creates the tracepoint "benchmark:benchmark_event".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) 	 When the tracepoint is enabled, it kicks off a kernel thread that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) 	 goes into an infinite loop (calling cond_sched() to let other tasks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) 	 run), and calls the tracepoint. Each iteration will record the time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) 	 it took to write to the tracepoint and the next iteration that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) 	 data will be passed to the tracepoint itself. That is, the tracepoint
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) 	 will report the time it took to do the previous tracepoint.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) 	 The string written to the tracepoint is a static string of 128 bytes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) 	 to keep the time the same. The initial string is simply a write of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) 	 "START". The second string records the cold cache time of the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) 	 write which is not added to the rest of the calculations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) 	 As it is a tight loop, it benchmarks as hot cache. That's fine because
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) 	 we care most about hot paths that are probably in cache already.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) 	 An example of the output:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) 	      START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) 	      first=3672 [COLD CACHED]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) 	      last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) 	      last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) 	      last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) 	      last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) 	      last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) 	      last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) config RING_BUFFER_BENCHMARK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) 	tristate "Ring buffer benchmark stress tester"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) 	depends on RING_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) 	  This option creates a test to stress the ring buffer and benchmark it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733) 	  It creates its own ring buffer such that it will not interfere with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) 	  any other users of the ring buffer (such as ftrace). It then creates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) 	  a producer and consumer that will run for 10 seconds and sleep for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) 	  10 seconds. Each interval it will print out the number of events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) 	  it recorded and give a rough estimate of how long each iteration took.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) 	  It does not disable interrupts or raise its priority, so it may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) 	  affected by processes that are running.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) config TRACE_EVAL_MAP_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745)        bool "Show eval mappings for trace events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746)        depends on TRACING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747)        help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) 	The "print fmt" of the trace events will show the enum/sizeof names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749) 	instead of their values. This can cause problems for user space tools
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) 	that use this string to parse the raw data as user space does not know
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) 	how to convert the string to its value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) 	To fix this, there's a special macro in the kernel that can be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) 	to convert an enum/sizeof into its value. If this macro is used, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) 	the print fmt strings will be converted to their values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) 	If something does not get converted properly, this option can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) 	used to show what enums/sizeof the kernel tried to convert.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) 	This option is for debugging the conversions. A file is created
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) 	in the tracing directory called "eval_map" that will show the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) 	names matched with their values and what trace event system they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) 	belong too.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) 	Normally, the mapping of the strings to values will be freed after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) 	boot up or module load. With this option, they will not be freed, as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) 	they are needed for the "eval_map" file. Enabling this option will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) 	increase the memory footprint of the running kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) 	If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) config GCOV_PROFILE_FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) 	bool "Enable GCOV profiling on ftrace subsystem"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) 	depends on GCOV_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) 	  Enable GCOV profiling on ftrace subsystem for checking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) 	  which functions/lines are tested.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) 	  Note that on a kernel compiled with this config, ftrace will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) 	  run significantly slower.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) config FTRACE_SELFTEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) config FTRACE_STARTUP_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) 	bool "Perform a startup test on ftrace"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) 	depends on GENERIC_TRACER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) 	select FTRACE_SELFTEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) 	  This option performs a series of startup tests on ftrace. On bootup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) 	  a series of tests are made to verify that the tracer is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) 	  functioning properly. It will do tests on all the configured
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795) 	  tracers of ftrace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) config EVENT_TRACE_STARTUP_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) 	bool "Run selftest on trace events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) 	depends on FTRACE_STARTUP_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) 	  This option performs a test on all trace events in the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) 	  It basically just enables each event and runs some code that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) 	  will trigger events (not necessarily the event it enables)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) 	  This may take some time run as there are a lot of events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) config EVENT_TRACE_TEST_SYSCALLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) 	bool "Run selftest on syscall events"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) 	depends on EVENT_TRACE_STARTUP_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) 	 This option will also enable testing every syscall event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) 	 It only enables the event and disables it and runs various loads
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) 	 with the event enabled. This adds a bit more time for kernel boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) 	 up since it runs this on every system call defined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) 	 TBD - enable a way to actually call the syscalls as we test their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) 	       events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819) config RING_BUFFER_STARTUP_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820)        bool "Ring buffer startup self test"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821)        depends on RING_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822)        help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) 	 Run a simple self test on the ring buffer on boot up. Late in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) 	 kernel boot sequence, the test will start that kicks off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825) 	 a thread per cpu. Each thread will write various size events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826) 	 into the ring buffer. Another thread is created to send IPIs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) 	 to each of the threads, where the IPI handler will also write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) 	 to the ring buffer, to test/stress the nesting ability.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) 	 If any anomalies are discovered, a warning will be displayed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) 	 and all ring buffers will be disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) 	 The test runs for 10 seconds. This will slow your boot time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) 	 by at least 10 more seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835) 	 At the end of the test, statics and more checks are done.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836) 	 It will output the stats of each per cpu buffer. What
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) 	 was written, the sizes, what was read, what was lost, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) 	 other similar details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) 	 If unsure, say N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842) config MMIOTRACE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) 	tristate "Test module for mmiotrace"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) 	depends on MMIOTRACE && m
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) 	  This is a dumb module for testing mmiotrace. It is very dangerous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847) 	  as it will write garbage to IO memory starting at a given address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) 	  However, it should be safe to use on e.g. unused portion of VRAM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850) 	  Say N, unless you absolutely know what you are doing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852) config PREEMPTIRQ_DELAY_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) 	tristate "Test module to create a preempt / IRQ disable delay thread to test latency tracers"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854) 	depends on m
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856) 	  Select this option to build a test module that can help test latency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857) 	  tracers by executing a preempt or irq disable section with a user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) 	  configurable delay. The module busy waits for the duration of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859) 	  critical section.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861) 	  For example, the following invocation generates a burst of three
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) 	  irq-disabled critical sections for 500us:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863) 	  modprobe preemptirq_delay_test test_mode=irq delay=500 burst_size=3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865) 	  If unsure, say N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867) config SYNTH_EVENT_GEN_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) 	tristate "Test module for in-kernel synthetic event generation"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) 	depends on SYNTH_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871)           This option creates a test module to check the base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 872)           functionality of in-kernel synthetic event definition and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 873)           generation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 874) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 875)           To test, insert the module, and then check the trace buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 876) 	  for the generated sample events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 877) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 878) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 879) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 880) config KPROBE_EVENT_GEN_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 881) 	tristate "Test module for in-kernel kprobe event generation"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 882) 	depends on KPROBE_EVENTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 883) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 884)           This option creates a test module to check the base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 885)           functionality of in-kernel kprobe event definition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 886) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 887)           To test, insert the module, and then check the trace buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 888) 	  for the generated kprobe events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 889) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 890) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 891) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 892) config HIST_TRIGGERS_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 893) 	bool "Hist trigger debug support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 894) 	depends on HIST_TRIGGERS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 895) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 896)           Add "hist_debug" file for each event, which when read will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 897)           dump out a bunch of internal details about the hist triggers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 898)           defined on that event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 899) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 900)           The hist_debug file serves a couple of purposes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 901) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 902)             - Helps developers verify that nothing is broken.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 903) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 904)             - Provides educational information to support the details
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 905)               of the hist trigger internals as described by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 906)               Documentation/trace/histogram-design.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 907) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 908)           The hist_debug output only covers the data structures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 909)           related to the histogram definitions themselves and doesn't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 910)           display the internals of map buckets or variable values of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 911)           running histograms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 912) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 913)           If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 914) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 915) endif # FTRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 916) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 917) endif # TRACING_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 918)