1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 216444a8aSArnaldo Carvalho de Melo# 3606576ceSSteven Rostedt# Architectures that offer an FUNCTION_TRACER implementation should 4606576ceSSteven Rostedt# select HAVE_FUNCTION_TRACER: 516444a8aSArnaldo Carvalho de Melo# 62a3a4f66SFrédéric Weisbecker 78d26487fSTörök Edwinconfig USER_STACKTRACE_SUPPORT 88d26487fSTörök Edwin bool 98d26487fSTörök Edwin 102a3a4f66SFrédéric Weisbeckerconfig NOP_TRACER 112a3a4f66SFrédéric Weisbecker bool 122a3a4f66SFrédéric Weisbecker 13606576ceSSteven Rostedtconfig HAVE_FUNCTION_TRACER 1416444a8aSArnaldo Carvalho de Melo bool 15555f386cSMike Frysinger help 165fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 17bc0c38d1SSteven Rostedt 18fb52607aSFrederic Weisbeckerconfig HAVE_FUNCTION_GRAPH_TRACER 1915e6cb36SFrederic Weisbecker bool 20555f386cSMike Frysinger help 215fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 2215e6cb36SFrederic Weisbecker 23677aa9f7SSteven Rostedtconfig HAVE_DYNAMIC_FTRACE 24677aa9f7SSteven Rostedt bool 25555f386cSMike Frysinger help 265fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 27677aa9f7SSteven Rostedt 2806aeaaeaSMasami Hiramatsuconfig HAVE_DYNAMIC_FTRACE_WITH_REGS 2906aeaaeaSMasami Hiramatsu bool 3006aeaaeaSMasami Hiramatsu 31763e34e7SSteven Rostedt (VMware)config HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 32763e34e7SSteven Rostedt (VMware) bool 33763e34e7SSteven Rostedt (VMware) 3402a474caSSteven Rostedt (VMware)config HAVE_DYNAMIC_FTRACE_WITH_ARGS 3502a474caSSteven Rostedt (VMware) bool 3602a474caSSteven Rostedt (VMware) help 3702a474caSSteven Rostedt (VMware) If this is set, then arguments and stack can be found from 3802a474caSSteven Rostedt (VMware) the pt_regs passed into the function callback regs parameter 3902a474caSSteven Rostedt (VMware) by default, even without setting the REGS flag in the ftrace_ops. 4002a474caSSteven Rostedt (VMware) This allows for use of regs_get_kernel_argument() and 4102a474caSSteven Rostedt (VMware) kernel_stack_pointer(). 4202a474caSSteven Rostedt (VMware) 438da3821bSSteven Rostedtconfig HAVE_FTRACE_MCOUNT_RECORD 448da3821bSSteven Rostedt bool 45555f386cSMike Frysinger help 465fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 478da3821bSSteven Rostedt 4866700001SJosh Stoneconfig HAVE_SYSCALL_TRACEPOINTS 49ee08c6ecSFrederic Weisbecker bool 50555f386cSMike Frysinger help 515fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 52ee08c6ecSFrederic Weisbecker 53a2546faeSSteven Rostedtconfig HAVE_FENTRY 54a2546faeSSteven Rostedt bool 55a2546faeSSteven Rostedt help 56a2546faeSSteven Rostedt Arch supports the gcc options -pg with -mfentry 57a2546faeSSteven Rostedt 582f4df001SVasily Gorbikconfig HAVE_NOP_MCOUNT 592f4df001SVasily Gorbik bool 602f4df001SVasily Gorbik help 612f4df001SVasily Gorbik Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount 622f4df001SVasily Gorbik 6322c8542dSSami Tolvanenconfig HAVE_OBJTOOL_MCOUNT 6422c8542dSSami Tolvanen bool 6522c8542dSSami Tolvanen help 6622c8542dSSami Tolvanen Arch supports objtool --mcount 6722c8542dSSami Tolvanen 68cf4db259SSteven Rostedtconfig HAVE_C_RECORDMCOUNT 6972441cb1SSteven Rostedt bool 7072441cb1SSteven Rostedt help 7172441cb1SSteven Rostedt C version of recordmcount available? 7272441cb1SSteven Rostedt 73352ad25aSSteven Rostedtconfig TRACER_MAX_TRACE 74352ad25aSSteven Rostedt bool 75352ad25aSSteven Rostedt 76ea632e9fSJosh Triplettconfig TRACE_CLOCK 77ea632e9fSJosh Triplett bool 78ea632e9fSJosh Triplett 797a8e76a3SSteven Rostedtconfig RING_BUFFER 807a8e76a3SSteven Rostedt bool 81ea632e9fSJosh Triplett select TRACE_CLOCK 8222287688SSteven Rostedt (Red Hat) select IRQ_WORK 837a8e76a3SSteven Rostedt 845f77a88bSTom Zanussiconfig EVENT_TRACING 85b11c53e1SZhaolei select CONTEXT_SWITCH_TRACER 8660f1d5e3SMasami Hiramatsu select GLOB 87b11c53e1SZhaolei bool 88b11c53e1SZhaolei 89b11c53e1SZhaoleiconfig CONTEXT_SWITCH_TRACER 905f77a88bSTom Zanussi bool 915f77a88bSTom Zanussi 9285bac32cSSteven Rostedtconfig RING_BUFFER_ALLOW_SWAP 9385bac32cSSteven Rostedt bool 9485bac32cSSteven Rostedt help 9585bac32cSSteven Rostedt Allow the use of ring_buffer_swap_cpu. 9685bac32cSSteven Rostedt Adds a very slight overhead to tracing when enabled. 9785bac32cSSteven Rostedt 98c3bc8fd6SJoel Fernandes (Google)config PREEMPTIRQ_TRACEPOINTS 99c3bc8fd6SJoel Fernandes (Google) bool 100c3bc8fd6SJoel Fernandes (Google) depends on TRACE_PREEMPT_TOGGLE || TRACE_IRQFLAGS 101c3bc8fd6SJoel Fernandes (Google) select TRACING 102c3bc8fd6SJoel Fernandes (Google) default y 103c3bc8fd6SJoel Fernandes (Google) help 104c3bc8fd6SJoel Fernandes (Google) Create preempt/irq toggle tracepoints if needed, so that other parts 105c3bc8fd6SJoel Fernandes (Google) of the kernel can use them to generate or add hooks to them. 106c3bc8fd6SJoel Fernandes (Google) 1075e0a0939SSteven Rostedt# All tracer options should select GENERIC_TRACER. For those options that are 1085e0a0939SSteven Rostedt# enabled by all tracers (context switch and event tracer) they select TRACING. 1095e0a0939SSteven Rostedt# This allows those options to appear when no other tracer is selected. But the 1105e0a0939SSteven Rostedt# options do not appear when something else selects it. We need the two options 1115e0a0939SSteven Rostedt# GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the 11240892367SRandy Dunlap# hiding of the automatic options. 1135e0a0939SSteven Rostedt 114bc0c38d1SSteven Rostedtconfig TRACING 115bc0c38d1SSteven Rostedt bool 1167a8e76a3SSteven Rostedt select RING_BUFFER 117c2c80529SAl Viro select STACKTRACE if STACKTRACE_SUPPORT 1185f87f112SIngo Molnar select TRACEPOINTS 119f3384b28SSteven Rostedt select NOP_TRACER 120769b0441SFrederic Weisbecker select BINARY_PRINTF 1215f77a88bSTom Zanussi select EVENT_TRACING 122ea632e9fSJosh Triplett select TRACE_CLOCK 123bc0c38d1SSteven Rostedt 1245e0a0939SSteven Rostedtconfig GENERIC_TRACER 1255e0a0939SSteven Rostedt bool 1265e0a0939SSteven Rostedt select TRACING 1275e0a0939SSteven Rostedt 12840ada30fSIngo Molnar# 12940ada30fSIngo Molnar# Minimum requirements an architecture has to meet for us to 13040ada30fSIngo Molnar# be able to offer generic tracing facilities: 13140ada30fSIngo Molnar# 13240ada30fSIngo Molnarconfig TRACING_SUPPORT 13340ada30fSIngo Molnar bool 1340ea5ee03SMichael Ellerman depends on TRACE_IRQFLAGS_SUPPORT 13540ada30fSIngo Molnar depends on STACKTRACE_SUPPORT 136422d3c7aSKOSAKI Motohiro default y 13740ada30fSIngo Molnar 1384ed9f071SSteven Rostedtmenuconfig FTRACE 1394ed9f071SSteven Rostedt bool "Tracers" 140*de32951bSMasahiro Yamada depends on TRACING_SUPPORT 14165b77242SSteven Rostedt default y if DEBUG_KERNEL 1424ed9f071SSteven Rostedt help 1434ed9f071SSteven Rostedt Enable the kernel tracing infrastructure. 1444ed9f071SSteven Rostedt 1454ed9f071SSteven Rostedtif FTRACE 14617d80fd0SPeter Zijlstra 1471e837945SSteven Rostedt (VMware)config BOOTTIME_TRACING 1481e837945SSteven Rostedt (VMware) bool "Boot-time Tracing support" 149d8a953ddSMasami Hiramatsu depends on TRACING 150d8a953ddSMasami Hiramatsu select BOOT_CONFIG 1511e837945SSteven Rostedt (VMware) help 1521e837945SSteven Rostedt (VMware) Enable developer to setup ftrace subsystem via supplemental 1531e837945SSteven Rostedt (VMware) kernel cmdline at boot time for debugging (tracing) driver 1541e837945SSteven Rostedt (VMware) initialization and boot process. 1551e837945SSteven Rostedt (VMware) 156606576ceSSteven Rostedtconfig FUNCTION_TRACER 1571b29b018SSteven Rostedt bool "Kernel Function Tracer" 158606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 1594d7a077cSSteven Rostedt select KALLSYMS 1605e0a0939SSteven Rostedt select GENERIC_TRACER 16135e8e302SSteven Rostedt select CONTEXT_SWITCH_TRACER 16260f1d5e3SMasami Hiramatsu select GLOB 16301b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 164e5a971d7SPaul E. McKenney select TASKS_RUDE_RCU 1651b29b018SSteven Rostedt help 1661b29b018SSteven Rostedt Enable the kernel to trace every kernel function. This is done 1671b29b018SSteven Rostedt by using a compiler feature to insert a small, 5-byte No-Operation 16840892367SRandy Dunlap instruction at the beginning of every kernel function, which NOP 1691b29b018SSteven Rostedt sequence is then dynamically patched into a tracer call when 1701b29b018SSteven Rostedt tracing is enabled by the administrator. If it's runtime disabled 1711b29b018SSteven Rostedt (the bootup default), then the overhead of the instructions is very 1721b29b018SSteven Rostedt small and not measurable even in micro-benchmarks. 17335e8e302SSteven Rostedt 174fb52607aSFrederic Weisbeckerconfig FUNCTION_GRAPH_TRACER 175fb52607aSFrederic Weisbecker bool "Kernel Function Graph Tracer" 176fb52607aSFrederic Weisbecker depends on HAVE_FUNCTION_GRAPH_TRACER 17715e6cb36SFrederic Weisbecker depends on FUNCTION_TRACER 178eb4a0378SSteven Rostedt depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE 179764f3b95SIngo Molnar default y 18015e6cb36SFrederic Weisbecker help 181fb52607aSFrederic Weisbecker Enable the kernel to trace a function at both its return 182fb52607aSFrederic Weisbecker and its entry. 183692105b8SMatt LaPlante Its first purpose is to trace the duration of functions and 184692105b8SMatt LaPlante draw a call graph for each thread with some information like 185692105b8SMatt LaPlante the return value. This is done by setting the current return 186692105b8SMatt LaPlante address on the current task structure into a stack of calls. 18715e6cb36SFrederic Weisbecker 18861778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE 18961778cd7SSteven Rostedt (VMware) bool "enable/disable function tracing dynamically" 19061778cd7SSteven Rostedt (VMware) depends on FUNCTION_TRACER 19161778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE 19261778cd7SSteven Rostedt (VMware) default y 19361778cd7SSteven Rostedt (VMware) help 19461778cd7SSteven Rostedt (VMware) This option will modify all the calls to function tracing 19561778cd7SSteven Rostedt (VMware) dynamically (will patch them out of the binary image and 19661778cd7SSteven Rostedt (VMware) replace them with a No-Op instruction) on boot up. During 19761778cd7SSteven Rostedt (VMware) compile time, a table is made of all the locations that ftrace 19861778cd7SSteven Rostedt (VMware) can function trace, and this table is linked into the kernel 19961778cd7SSteven Rostedt (VMware) image. When this is enabled, functions can be individually 20061778cd7SSteven Rostedt (VMware) enabled, and the functions not enabled will not affect 20161778cd7SSteven Rostedt (VMware) performance of the system. 20261778cd7SSteven Rostedt (VMware) 20361778cd7SSteven Rostedt (VMware) See the files in /sys/kernel/debug/tracing: 20461778cd7SSteven Rostedt (VMware) available_filter_functions 20561778cd7SSteven Rostedt (VMware) set_ftrace_filter 20661778cd7SSteven Rostedt (VMware) set_ftrace_notrace 20761778cd7SSteven Rostedt (VMware) 20861778cd7SSteven Rostedt (VMware) This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but 20961778cd7SSteven Rostedt (VMware) otherwise has native performance as long as no tracing is active. 21061778cd7SSteven Rostedt (VMware) 21161778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE_WITH_REGS 21261778cd7SSteven Rostedt (VMware) def_bool y 21361778cd7SSteven Rostedt (VMware) depends on DYNAMIC_FTRACE 21461778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE_WITH_REGS 21561778cd7SSteven Rostedt (VMware) 21661778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE_WITH_DIRECT_CALLS 21761778cd7SSteven Rostedt (VMware) def_bool y 21849a962c0SNaveen N. Rao depends on DYNAMIC_FTRACE_WITH_REGS 21961778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 22061778cd7SSteven Rostedt (VMware) 22112f9951dSLukas Bulwahnconfig DYNAMIC_FTRACE_WITH_ARGS 22212f9951dSLukas Bulwahn def_bool y 22312f9951dSLukas Bulwahn depends on DYNAMIC_FTRACE 22412f9951dSLukas Bulwahn depends on HAVE_DYNAMIC_FTRACE_WITH_ARGS 22512f9951dSLukas Bulwahn 22661778cd7SSteven Rostedt (VMware)config FUNCTION_PROFILER 22761778cd7SSteven Rostedt (VMware) bool "Kernel function profiler" 22861778cd7SSteven Rostedt (VMware) depends on FUNCTION_TRACER 22961778cd7SSteven Rostedt (VMware) default n 23061778cd7SSteven Rostedt (VMware) help 23161778cd7SSteven Rostedt (VMware) This option enables the kernel function profiler. A file is created 23261778cd7SSteven Rostedt (VMware) in debugfs called function_profile_enabled which defaults to zero. 23361778cd7SSteven Rostedt (VMware) When a 1 is echoed into this file profiling begins, and when a 23461778cd7SSteven Rostedt (VMware) zero is entered, profiling stops. A "functions" file is created in 23561778cd7SSteven Rostedt (VMware) the trace_stat directory; this file shows the list of functions that 23661778cd7SSteven Rostedt (VMware) have been hit and their counters. 23761778cd7SSteven Rostedt (VMware) 23861778cd7SSteven Rostedt (VMware) If in doubt, say N. 23961778cd7SSteven Rostedt (VMware) 24061778cd7SSteven Rostedt (VMware)config STACK_TRACER 24161778cd7SSteven Rostedt (VMware) bool "Trace max stack" 24261778cd7SSteven Rostedt (VMware) depends on HAVE_FUNCTION_TRACER 24361778cd7SSteven Rostedt (VMware) select FUNCTION_TRACER 24461778cd7SSteven Rostedt (VMware) select STACKTRACE 24561778cd7SSteven Rostedt (VMware) select KALLSYMS 24661778cd7SSteven Rostedt (VMware) help 24761778cd7SSteven Rostedt (VMware) This special tracer records the maximum stack footprint of the 24861778cd7SSteven Rostedt (VMware) kernel and displays it in /sys/kernel/debug/tracing/stack_trace. 24961778cd7SSteven Rostedt (VMware) 25061778cd7SSteven Rostedt (VMware) This tracer works by hooking into every function call that the 25161778cd7SSteven Rostedt (VMware) kernel executes, and keeping a maximum stack depth value and 25261778cd7SSteven Rostedt (VMware) stack-trace saved. If this is configured with DYNAMIC_FTRACE 25361778cd7SSteven Rostedt (VMware) then it will not have any overhead while the stack tracer 25461778cd7SSteven Rostedt (VMware) is disabled. 25561778cd7SSteven Rostedt (VMware) 25661778cd7SSteven Rostedt (VMware) To enable the stack tracer on bootup, pass in 'stacktrace' 25761778cd7SSteven Rostedt (VMware) on the kernel command line. 25861778cd7SSteven Rostedt (VMware) 25961778cd7SSteven Rostedt (VMware) The stack tracer can also be enabled or disabled via the 26061778cd7SSteven Rostedt (VMware) sysctl kernel.stack_tracer_enabled 26161778cd7SSteven Rostedt (VMware) 26261778cd7SSteven Rostedt (VMware) Say N if unsure. 26361778cd7SSteven Rostedt (VMware) 264c3bc8fd6SJoel Fernandes (Google)config TRACE_PREEMPT_TOGGLE 265c3bc8fd6SJoel Fernandes (Google) bool 266c3bc8fd6SJoel Fernandes (Google) help 267c3bc8fd6SJoel Fernandes (Google) Enables hooks which will be called when preemption is first disabled, 268c3bc8fd6SJoel Fernandes (Google) and last enabled. 269bac429f0SSteven Rostedt 27081d68a96SSteven Rostedtconfig IRQSOFF_TRACER 27181d68a96SSteven Rostedt bool "Interrupts-off Latency Tracer" 27281d68a96SSteven Rostedt default n 27381d68a96SSteven Rostedt depends on TRACE_IRQFLAGS_SUPPORT 27481d68a96SSteven Rostedt select TRACE_IRQFLAGS 2755e0a0939SSteven Rostedt select GENERIC_TRACER 27681d68a96SSteven Rostedt select TRACER_MAX_TRACE 27785bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 27822cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 2790b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 28081d68a96SSteven Rostedt help 28181d68a96SSteven Rostedt This option measures the time spent in irqs-off critical 28281d68a96SSteven Rostedt sections, with microsecond accuracy. 28381d68a96SSteven Rostedt 28481d68a96SSteven Rostedt The default measurement method is a maximum search, which is 28581d68a96SSteven Rostedt disabled by default and can be runtime (re-)started 28681d68a96SSteven Rostedt via: 28781d68a96SSteven Rostedt 288156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 28981d68a96SSteven Rostedt 29040892367SRandy Dunlap (Note that kernel size and overhead increase with this option 2916cd8a4bbSSteven Rostedt enabled. This option and the preempt-off timing option can be 2926cd8a4bbSSteven Rostedt used together or separately.) 2936cd8a4bbSSteven Rostedt 2946cd8a4bbSSteven Rostedtconfig PREEMPT_TRACER 2956cd8a4bbSSteven Rostedt bool "Preemption-off Latency Tracer" 2966cd8a4bbSSteven Rostedt default n 29730c93704SThomas Gleixner depends on PREEMPTION 2985e0a0939SSteven Rostedt select GENERIC_TRACER 2996cd8a4bbSSteven Rostedt select TRACER_MAX_TRACE 30085bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 30122cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 3020b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 303c3bc8fd6SJoel Fernandes (Google) select TRACE_PREEMPT_TOGGLE 3046cd8a4bbSSteven Rostedt help 30540892367SRandy Dunlap This option measures the time spent in preemption-off critical 3066cd8a4bbSSteven Rostedt sections, with microsecond accuracy. 3076cd8a4bbSSteven Rostedt 3086cd8a4bbSSteven Rostedt The default measurement method is a maximum search, which is 3096cd8a4bbSSteven Rostedt disabled by default and can be runtime (re-)started 3106cd8a4bbSSteven Rostedt via: 3116cd8a4bbSSteven Rostedt 312156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 3136cd8a4bbSSteven Rostedt 31440892367SRandy Dunlap (Note that kernel size and overhead increase with this option 3156cd8a4bbSSteven Rostedt enabled. This option and the irqs-off timing option can be 3166cd8a4bbSSteven Rostedt used together or separately.) 3176cd8a4bbSSteven Rostedt 318352ad25aSSteven Rostedtconfig SCHED_TRACER 319352ad25aSSteven Rostedt bool "Scheduling Latency Tracer" 3205e0a0939SSteven Rostedt select GENERIC_TRACER 321352ad25aSSteven Rostedt select CONTEXT_SWITCH_TRACER 322352ad25aSSteven Rostedt select TRACER_MAX_TRACE 32322cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 324352ad25aSSteven Rostedt help 325352ad25aSSteven Rostedt This tracer tracks the latency of the highest priority task 326352ad25aSSteven Rostedt to be scheduled in, starting from the point it has woken up. 327352ad25aSSteven Rostedt 328e7c15cd8SSteven Rostedt (Red Hat)config HWLAT_TRACER 329e7c15cd8SSteven Rostedt (Red Hat) bool "Tracer to detect hardware latencies (like SMIs)" 330e7c15cd8SSteven Rostedt (Red Hat) select GENERIC_TRACER 331e7c15cd8SSteven Rostedt (Red Hat) help 332e7c15cd8SSteven Rostedt (Red Hat) This tracer, when enabled will create one or more kernel threads, 333c5c1ea75SJesper Dangaard Brouer depending on what the cpumask file is set to, which each thread 334e7c15cd8SSteven Rostedt (Red Hat) spinning in a loop looking for interruptions caused by 335e7c15cd8SSteven Rostedt (Red Hat) something other than the kernel. For example, if a 336e7c15cd8SSteven Rostedt (Red Hat) System Management Interrupt (SMI) takes a noticeable amount of 337e7c15cd8SSteven Rostedt (Red Hat) time, this tracer will detect it. This is useful for testing 338e7c15cd8SSteven Rostedt (Red Hat) if a system is reliable for Real Time tasks. 339e7c15cd8SSteven Rostedt (Red Hat) 340e7c15cd8SSteven Rostedt (Red Hat) Some files are created in the tracing directory when this 341e7c15cd8SSteven Rostedt (Red Hat) is enabled: 342e7c15cd8SSteven Rostedt (Red Hat) 343e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/width - time in usecs for how long to spin for 344e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/window - time in usecs between the start of each 345e7c15cd8SSteven Rostedt (Red Hat) iteration 346e7c15cd8SSteven Rostedt (Red Hat) 347e7c15cd8SSteven Rostedt (Red Hat) A kernel thread is created that will spin with interrupts disabled 348c5c1ea75SJesper Dangaard Brouer for "width" microseconds in every "window" cycle. It will not spin 349e7c15cd8SSteven Rostedt (Red Hat) for "window - width" microseconds, where the system can 350e7c15cd8SSteven Rostedt (Red Hat) continue to operate. 351e7c15cd8SSteven Rostedt (Red Hat) 352e7c15cd8SSteven Rostedt (Red Hat) The output will appear in the trace and trace_pipe files. 353e7c15cd8SSteven Rostedt (Red Hat) 354e7c15cd8SSteven Rostedt (Red Hat) When the tracer is not running, it has no affect on the system, 355e7c15cd8SSteven Rostedt (Red Hat) but when it is running, it can cause the system to be 356e7c15cd8SSteven Rostedt (Red Hat) periodically non responsive. Do not run this tracer on a 357e7c15cd8SSteven Rostedt (Red Hat) production system. 358e7c15cd8SSteven Rostedt (Red Hat) 359e7c15cd8SSteven Rostedt (Red Hat) To enable this tracer, echo in "hwlat" into the current_tracer 360e7c15cd8SSteven Rostedt (Red Hat) file. Every time a latency is greater than tracing_thresh, it will 361e7c15cd8SSteven Rostedt (Red Hat) be recorded into the ring buffer. 362e7c15cd8SSteven Rostedt (Red Hat) 363bce29ac9SDaniel Bristot de Oliveiraconfig OSNOISE_TRACER 364bce29ac9SDaniel Bristot de Oliveira bool "OS Noise tracer" 365bce29ac9SDaniel Bristot de Oliveira select GENERIC_TRACER 366bce29ac9SDaniel Bristot de Oliveira help 367bce29ac9SDaniel Bristot de Oliveira In the context of high-performance computing (HPC), the Operating 368bce29ac9SDaniel Bristot de Oliveira System Noise (osnoise) refers to the interference experienced by an 369bce29ac9SDaniel Bristot de Oliveira application due to activities inside the operating system. In the 370bce29ac9SDaniel Bristot de Oliveira context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread 371bce29ac9SDaniel Bristot de Oliveira can cause noise to the system. Moreover, hardware-related jobs can 372bce29ac9SDaniel Bristot de Oliveira also cause noise, for example, via SMIs. 373bce29ac9SDaniel Bristot de Oliveira 374bce29ac9SDaniel Bristot de Oliveira The osnoise tracer leverages the hwlat_detector by running a similar 375bce29ac9SDaniel Bristot de Oliveira loop with preemption, SoftIRQs and IRQs enabled, thus allowing all 376bce29ac9SDaniel Bristot de Oliveira the sources of osnoise during its execution. The osnoise tracer takes 377bce29ac9SDaniel Bristot de Oliveira note of the entry and exit point of any source of interferences, 378bce29ac9SDaniel Bristot de Oliveira increasing a per-cpu interference counter. It saves an interference 379bce29ac9SDaniel Bristot de Oliveira counter for each source of interference. The interference counter for 380bce29ac9SDaniel Bristot de Oliveira NMI, IRQs, SoftIRQs, and threads is increased anytime the tool 381bce29ac9SDaniel Bristot de Oliveira observes these interferences' entry events. When a noise happens 382bce29ac9SDaniel Bristot de Oliveira without any interference from the operating system level, the 383bce29ac9SDaniel Bristot de Oliveira hardware noise counter increases, pointing to a hardware-related 384bce29ac9SDaniel Bristot de Oliveira noise. In this way, osnoise can account for any source of 385bce29ac9SDaniel Bristot de Oliveira interference. At the end of the period, the osnoise tracer prints 386bce29ac9SDaniel Bristot de Oliveira the sum of all noise, the max single noise, the percentage of CPU 387bce29ac9SDaniel Bristot de Oliveira available for the thread, and the counters for the noise sources. 388bce29ac9SDaniel Bristot de Oliveira 389bce29ac9SDaniel Bristot de Oliveira In addition to the tracer, a set of tracepoints were added to 390bce29ac9SDaniel Bristot de Oliveira facilitate the identification of the osnoise source. 391bce29ac9SDaniel Bristot de Oliveira 392bce29ac9SDaniel Bristot de Oliveira The output will appear in the trace and trace_pipe files. 393bce29ac9SDaniel Bristot de Oliveira 394bce29ac9SDaniel Bristot de Oliveira To enable this tracer, echo in "osnoise" into the current_tracer 395bce29ac9SDaniel Bristot de Oliveira file. 396bce29ac9SDaniel Bristot de Oliveira 397a955d7eaSDaniel Bristot de Oliveiraconfig TIMERLAT_TRACER 398a955d7eaSDaniel Bristot de Oliveira bool "Timerlat tracer" 399a955d7eaSDaniel Bristot de Oliveira select OSNOISE_TRACER 400a955d7eaSDaniel Bristot de Oliveira select GENERIC_TRACER 401a955d7eaSDaniel Bristot de Oliveira help 402a955d7eaSDaniel Bristot de Oliveira The timerlat tracer aims to help the preemptive kernel developers 403a955d7eaSDaniel Bristot de Oliveira to find sources of wakeup latencies of real-time threads. 404a955d7eaSDaniel Bristot de Oliveira 405a955d7eaSDaniel Bristot de Oliveira The tracer creates a per-cpu kernel thread with real-time priority. 406a955d7eaSDaniel Bristot de Oliveira The tracer thread sets a periodic timer to wakeup itself, and goes 407a955d7eaSDaniel Bristot de Oliveira to sleep waiting for the timer to fire. At the wakeup, the thread 408a955d7eaSDaniel Bristot de Oliveira then computes a wakeup latency value as the difference between 409a955d7eaSDaniel Bristot de Oliveira the current time and the absolute time that the timer was set 410a955d7eaSDaniel Bristot de Oliveira to expire. 411a955d7eaSDaniel Bristot de Oliveira 412a955d7eaSDaniel Bristot de Oliveira The tracer prints two lines at every activation. The first is the 413a955d7eaSDaniel Bristot de Oliveira timer latency observed at the hardirq context before the 414a955d7eaSDaniel Bristot de Oliveira activation of the thread. The second is the timer latency observed 415a955d7eaSDaniel Bristot de Oliveira by the thread, which is the same level that cyclictest reports. The 416a955d7eaSDaniel Bristot de Oliveira ACTIVATION ID field serves to relate the irq execution to its 417a955d7eaSDaniel Bristot de Oliveira respective thread execution. 418a955d7eaSDaniel Bristot de Oliveira 419a955d7eaSDaniel Bristot de Oliveira The tracer is build on top of osnoise tracer, and the osnoise: 420a955d7eaSDaniel Bristot de Oliveira events can be used to trace the source of interference from NMI, 421a955d7eaSDaniel Bristot de Oliveira IRQs and other threads. It also enables the capture of the 422a955d7eaSDaniel Bristot de Oliveira stacktrace at the IRQ context, which helps to identify the code 423a955d7eaSDaniel Bristot de Oliveira path that can cause thread delay. 424a955d7eaSDaniel Bristot de Oliveira 42521b3ce30SSteven Rostedt (VMware)config MMIOTRACE 42621b3ce30SSteven Rostedt (VMware) bool "Memory mapped IO tracing" 42721b3ce30SSteven Rostedt (VMware) depends on HAVE_MMIOTRACE_SUPPORT && PCI 42821b3ce30SSteven Rostedt (VMware) select GENERIC_TRACER 42921b3ce30SSteven Rostedt (VMware) help 43021b3ce30SSteven Rostedt (VMware) Mmiotrace traces Memory Mapped I/O access and is meant for 43121b3ce30SSteven Rostedt (VMware) debugging and reverse engineering. It is called from the ioremap 43221b3ce30SSteven Rostedt (VMware) implementation and works via page faults. Tracing is disabled by 43321b3ce30SSteven Rostedt (VMware) default and can be enabled at run-time. 43421b3ce30SSteven Rostedt (VMware) 43521b3ce30SSteven Rostedt (VMware) See Documentation/trace/mmiotrace.rst. 43621b3ce30SSteven Rostedt (VMware) If you are not helping to develop drivers, say N. 43721b3ce30SSteven Rostedt (VMware) 438897f17a6SSteven Rostedtconfig ENABLE_DEFAULT_TRACERS 439897f17a6SSteven Rostedt bool "Trace process context switches and events" 4405e0a0939SSteven Rostedt depends on !GENERIC_TRACER 441b77e38aaSSteven Rostedt select TRACING 442b77e38aaSSteven Rostedt help 44340892367SRandy Dunlap This tracer hooks to various trace points in the kernel, 444b77e38aaSSteven Rostedt allowing the user to pick and choose which trace point they 445897f17a6SSteven Rostedt want to trace. It also includes the sched_switch tracer plugin. 446a7abe97fSSteven Rostedt 447ee08c6ecSFrederic Weisbeckerconfig FTRACE_SYSCALLS 448ee08c6ecSFrederic Weisbecker bool "Trace syscalls" 44966700001SJosh Stone depends on HAVE_SYSCALL_TRACEPOINTS 4505e0a0939SSteven Rostedt select GENERIC_TRACER 4510ea1c415SFrederic Weisbecker select KALLSYMS 452ee08c6ecSFrederic Weisbecker help 453ee08c6ecSFrederic Weisbecker Basic tracer to catch the syscall entry and exit events. 454ee08c6ecSFrederic Weisbecker 455debdd57fSHiraku Toyookaconfig TRACER_SNAPSHOT 456debdd57fSHiraku Toyooka bool "Create a snapshot trace buffer" 457debdd57fSHiraku Toyooka select TRACER_MAX_TRACE 458debdd57fSHiraku Toyooka help 459debdd57fSHiraku Toyooka Allow tracing users to take snapshot of the current buffer using the 460debdd57fSHiraku Toyooka ftrace interface, e.g.: 461debdd57fSHiraku Toyooka 462debdd57fSHiraku Toyooka echo 1 > /sys/kernel/debug/tracing/snapshot 463debdd57fSHiraku Toyooka cat snapshot 464debdd57fSHiraku Toyooka 4650b85ffc2SSteven Rostedt (Red Hat)config TRACER_SNAPSHOT_PER_CPU_SWAP 4660b85ffc2SSteven Rostedt (Red Hat) bool "Allow snapshot to swap per CPU" 4670b85ffc2SSteven Rostedt (Red Hat) depends on TRACER_SNAPSHOT 4680b85ffc2SSteven Rostedt (Red Hat) select RING_BUFFER_ALLOW_SWAP 4690b85ffc2SSteven Rostedt (Red Hat) help 4700b85ffc2SSteven Rostedt (Red Hat) Allow doing a snapshot of a single CPU buffer instead of a 4710b85ffc2SSteven Rostedt (Red Hat) full swap (all buffers). If this is set, then the following is 4720b85ffc2SSteven Rostedt (Red Hat) allowed: 4730b85ffc2SSteven Rostedt (Red Hat) 4740b85ffc2SSteven Rostedt (Red Hat) echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot 4750b85ffc2SSteven Rostedt (Red Hat) 4760b85ffc2SSteven Rostedt (Red Hat) After which, only the tracing buffer for CPU 2 was swapped with 4770b85ffc2SSteven Rostedt (Red Hat) the main tracing buffer, and the other CPU buffers remain the same. 4780b85ffc2SSteven Rostedt (Red Hat) 4790b85ffc2SSteven Rostedt (Red Hat) When this is enabled, this adds a little more overhead to the 4800b85ffc2SSteven Rostedt (Red Hat) trace recording, as it needs to add some checks to synchronize 4810b85ffc2SSteven Rostedt (Red Hat) recording with swaps. But this does not affect the performance 4820b85ffc2SSteven Rostedt (Red Hat) of the overall system. This is enabled by default when the preempt 4830b85ffc2SSteven Rostedt (Red Hat) or irq latency tracers are enabled, as those need to swap as well 4840b85ffc2SSteven Rostedt (Red Hat) and already adds the overhead (plus a lot more). 4850b85ffc2SSteven Rostedt (Red Hat) 4862ed84eebSSteven Rostedtconfig TRACE_BRANCH_PROFILING 4879ae5b879SSteven Rostedt bool 4885e0a0939SSteven Rostedt select GENERIC_TRACER 4899ae5b879SSteven Rostedt 4909ae5b879SSteven Rostedtchoice 4919ae5b879SSteven Rostedt prompt "Branch Profiling" 4929ae5b879SSteven Rostedt default BRANCH_PROFILE_NONE 4939ae5b879SSteven Rostedt help 4949ae5b879SSteven Rostedt The branch profiling is a software profiler. It will add hooks 4959ae5b879SSteven Rostedt into the C conditionals to test which path a branch takes. 4969ae5b879SSteven Rostedt 4979ae5b879SSteven Rostedt The likely/unlikely profiler only looks at the conditions that 4989ae5b879SSteven Rostedt are annotated with a likely or unlikely macro. 4999ae5b879SSteven Rostedt 50040892367SRandy Dunlap The "all branch" profiler will profile every if-statement in the 5019ae5b879SSteven Rostedt kernel. This profiler will also enable the likely/unlikely 50240892367SRandy Dunlap profiler. 5039ae5b879SSteven Rostedt 50440892367SRandy Dunlap Either of the above profilers adds a bit of overhead to the system. 50540892367SRandy Dunlap If unsure, choose "No branch profiling". 5069ae5b879SSteven Rostedt 5079ae5b879SSteven Rostedtconfig BRANCH_PROFILE_NONE 5089ae5b879SSteven Rostedt bool "No branch profiling" 5099ae5b879SSteven Rostedt help 5109ae5b879SSteven Rostedt No branch profiling. Branch profiling adds a bit of overhead. 5119ae5b879SSteven Rostedt Only enable it if you want to analyse the branching behavior. 5129ae5b879SSteven Rostedt Otherwise keep it disabled. 5139ae5b879SSteven Rostedt 5149ae5b879SSteven Rostedtconfig PROFILE_ANNOTATED_BRANCHES 5159ae5b879SSteven Rostedt bool "Trace likely/unlikely profiler" 5169ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5171f0d69a9SSteven Rostedt help 51859bf8964SMasanari Iida This tracer profiles all likely and unlikely macros 5191f0d69a9SSteven Rostedt in the kernel. It will display the results in: 5201f0d69a9SSteven Rostedt 52113e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_annotated 5221f0d69a9SSteven Rostedt 52340892367SRandy Dunlap Note: this will add a significant overhead; only turn this 5241f0d69a9SSteven Rostedt on if you need to profile the system's use of these macros. 5251f0d69a9SSteven Rostedt 5262bcd521aSSteven Rostedtconfig PROFILE_ALL_BRANCHES 52768e76e03SRandy Dunlap bool "Profile all if conditionals" if !FORTIFY_SOURCE 5289ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5292bcd521aSSteven Rostedt help 5302bcd521aSSteven Rostedt This tracer profiles all branch conditions. Every if () 5312bcd521aSSteven Rostedt taken in the kernel is recorded whether it hit or miss. 5322bcd521aSSteven Rostedt The results will be displayed in: 5332bcd521aSSteven Rostedt 53413e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_all 5352bcd521aSSteven Rostedt 5369ae5b879SSteven Rostedt This option also enables the likely/unlikely profiler. 5379ae5b879SSteven Rostedt 5382bcd521aSSteven Rostedt This configuration, when enabled, will impose a great overhead 5392bcd521aSSteven Rostedt on the system. This should only be enabled when the system 54040892367SRandy Dunlap is to be analyzed in much detail. 5419ae5b879SSteven Rostedtendchoice 5422bcd521aSSteven Rostedt 5432ed84eebSSteven Rostedtconfig TRACING_BRANCHES 54452f232cbSSteven Rostedt bool 54552f232cbSSteven Rostedt help 54652f232cbSSteven Rostedt Selected by tracers that will trace the likely and unlikely 54752f232cbSSteven Rostedt conditions. This prevents the tracers themselves from being 54852f232cbSSteven Rostedt profiled. Profiling the tracing infrastructure can only happen 54952f232cbSSteven Rostedt when the likelys and unlikelys are not being traced. 55052f232cbSSteven Rostedt 5512ed84eebSSteven Rostedtconfig BRANCH_TRACER 55252f232cbSSteven Rostedt bool "Trace likely/unlikely instances" 5532ed84eebSSteven Rostedt depends on TRACE_BRANCH_PROFILING 5542ed84eebSSteven Rostedt select TRACING_BRANCHES 55552f232cbSSteven Rostedt help 55652f232cbSSteven Rostedt This traces the events of likely and unlikely condition 55752f232cbSSteven Rostedt calls in the kernel. The difference between this and the 55852f232cbSSteven Rostedt "Trace likely/unlikely profiler" is that this is not a 55952f232cbSSteven Rostedt histogram of the callers, but actually places the calling 56052f232cbSSteven Rostedt events into a running trace buffer to see when and where the 56152f232cbSSteven Rostedt events happened, as well as their results. 56252f232cbSSteven Rostedt 56352f232cbSSteven Rostedt Say N if unsure. 56452f232cbSSteven Rostedt 5652db270a8SFrederic Weisbeckerconfig BLK_DEV_IO_TRACE 56640892367SRandy Dunlap bool "Support for tracing block IO actions" 5672db270a8SFrederic Weisbecker depends on SYSFS 5681dfba05dSIngo Molnar depends on BLOCK 5692db270a8SFrederic Weisbecker select RELAY 5702db270a8SFrederic Weisbecker select DEBUG_FS 5712db270a8SFrederic Weisbecker select TRACEPOINTS 5725e0a0939SSteven Rostedt select GENERIC_TRACER 5732db270a8SFrederic Weisbecker select STACKTRACE 5742db270a8SFrederic Weisbecker help 5752db270a8SFrederic Weisbecker Say Y here if you want to be able to trace the block layer actions 5762db270a8SFrederic Weisbecker on a given queue. Tracing allows you to see any traffic happening 5772db270a8SFrederic Weisbecker on a block device queue. For more information (and the userspace 5782db270a8SFrederic Weisbecker support tools needed), fetch the blktrace tools from: 5792db270a8SFrederic Weisbecker 5802db270a8SFrederic Weisbecker git://git.kernel.dk/blktrace.git 5812db270a8SFrederic Weisbecker 5822db270a8SFrederic Weisbecker Tracing also is possible using the ftrace interface, e.g.: 5832db270a8SFrederic Weisbecker 5842db270a8SFrederic Weisbecker echo 1 > /sys/block/sda/sda1/trace/enable 5852db270a8SFrederic Weisbecker echo blk > /sys/kernel/debug/tracing/current_tracer 5862db270a8SFrederic Weisbecker cat /sys/kernel/debug/tracing/trace_pipe 5872db270a8SFrederic Weisbecker 5882db270a8SFrederic Weisbecker If unsure, say N. 58936994e58SFrederic Weisbecker 5906b0b7551SAnton Blanchardconfig KPROBE_EVENTS 591413d37d1SMasami Hiramatsu depends on KPROBES 592f850c30cSHeiko Carstens depends on HAVE_REGS_AND_STACK_ACCESS_API 59377b44d1bSMasami Hiramatsu bool "Enable kprobes-based dynamic events" 594413d37d1SMasami Hiramatsu select TRACING 5958ab83f56SSrikar Dronamraju select PROBE_EVENTS 5966212dd29SMasami Hiramatsu select DYNAMIC_EVENTS 59777b44d1bSMasami Hiramatsu default y 598413d37d1SMasami Hiramatsu help 59940892367SRandy Dunlap This allows the user to add tracing events (similar to tracepoints) 60040892367SRandy Dunlap on the fly via the ftrace interface. See 6015fb94e9cSMauro Carvalho Chehab Documentation/trace/kprobetrace.rst for more details. 60277b44d1bSMasami Hiramatsu 60377b44d1bSMasami Hiramatsu Those events can be inserted wherever kprobes can probe, and record 60477b44d1bSMasami Hiramatsu various register and memory values. 60577b44d1bSMasami Hiramatsu 60640892367SRandy Dunlap This option is also required by perf-probe subcommand of perf tools. 60740892367SRandy Dunlap If you want to use perf tools, this option is strongly recommended. 608413d37d1SMasami Hiramatsu 60945408c4fSMasami Hiramatsuconfig KPROBE_EVENTS_ON_NOTRACE 61045408c4fSMasami Hiramatsu bool "Do NOT protect notrace function from kprobe events" 61145408c4fSMasami Hiramatsu depends on KPROBE_EVENTS 6127bb83f6fSMasami Hiramatsu depends on DYNAMIC_FTRACE 61345408c4fSMasami Hiramatsu default n 61445408c4fSMasami Hiramatsu help 61545408c4fSMasami Hiramatsu This is only for the developers who want to debug ftrace itself 61645408c4fSMasami Hiramatsu using kprobe events. 61745408c4fSMasami Hiramatsu 61845408c4fSMasami Hiramatsu If kprobes can use ftrace instead of breakpoint, ftrace related 61928cc65a1SColin Ian King functions are protected from kprobe-events to prevent an infinite 62045408c4fSMasami Hiramatsu recursion or any unexpected execution path which leads to a kernel 62145408c4fSMasami Hiramatsu crash. 62245408c4fSMasami Hiramatsu 62345408c4fSMasami Hiramatsu This option disables such protection and allows you to put kprobe 62445408c4fSMasami Hiramatsu events on ftrace functions for debugging ftrace by itself. 62545408c4fSMasami Hiramatsu Note that this might let you shoot yourself in the foot. 62645408c4fSMasami Hiramatsu 62745408c4fSMasami Hiramatsu If unsure, say N. 62845408c4fSMasami Hiramatsu 6296b0b7551SAnton Blanchardconfig UPROBE_EVENTS 630f3f096cfSSrikar Dronamraju bool "Enable uprobes-based dynamic events" 631f3f096cfSSrikar Dronamraju depends on ARCH_SUPPORTS_UPROBES 632f3f096cfSSrikar Dronamraju depends on MMU 63309294e31SDavid A. Long depends on PERF_EVENTS 634f3f096cfSSrikar Dronamraju select UPROBES 635f3f096cfSSrikar Dronamraju select PROBE_EVENTS 6360597c49cSMasami Hiramatsu select DYNAMIC_EVENTS 637f3f096cfSSrikar Dronamraju select TRACING 63861f35d75SArnaldo Carvalho de Melo default y 639f3f096cfSSrikar Dronamraju help 640f3f096cfSSrikar Dronamraju This allows the user to add tracing events on top of userspace 641f3f096cfSSrikar Dronamraju dynamic events (similar to tracepoints) on the fly via the trace 642f3f096cfSSrikar Dronamraju events interface. Those events can be inserted wherever uprobes 643f3f096cfSSrikar Dronamraju can probe, and record various registers. 644f3f096cfSSrikar Dronamraju This option is required if you plan to use perf-probe subcommand 645f3f096cfSSrikar Dronamraju of perf tools on user space applications. 646f3f096cfSSrikar Dronamraju 647e1abf2ccSIngo Molnarconfig BPF_EVENTS 648e1abf2ccSIngo Molnar depends on BPF_SYSCALL 6496b0b7551SAnton Blanchard depends on (KPROBE_EVENTS || UPROBE_EVENTS) && PERF_EVENTS 650e1abf2ccSIngo Molnar bool 651e1abf2ccSIngo Molnar default y 652e1abf2ccSIngo Molnar help 6535cbd22c1SPeter Wu This allows the user to attach BPF programs to kprobe, uprobe, and 6545cbd22c1SPeter Wu tracepoint events. 655e1abf2ccSIngo Molnar 6565448d44cSMasami Hiramatsuconfig DYNAMIC_EVENTS 6575448d44cSMasami Hiramatsu def_bool n 6585448d44cSMasami Hiramatsu 6598ab83f56SSrikar Dronamrajuconfig PROBE_EVENTS 6608ab83f56SSrikar Dronamraju def_bool n 6618ab83f56SSrikar Dronamraju 6629802d865SJosef Bacikconfig BPF_KPROBE_OVERRIDE 6639802d865SJosef Bacik bool "Enable BPF programs to override a kprobed function" 6649802d865SJosef Bacik depends on BPF_EVENTS 665540adea3SMasami Hiramatsu depends on FUNCTION_ERROR_INJECTION 6669802d865SJosef Bacik default n 6679802d865SJosef Bacik help 6689802d865SJosef Bacik Allows BPF to override the execution of a probed function and 6699802d865SJosef Bacik set a different return value. This is used for error injection. 6709802d865SJosef Bacik 6718da3821bSSteven Rostedtconfig FTRACE_MCOUNT_RECORD 6728da3821bSSteven Rostedt def_bool y 6738da3821bSSteven Rostedt depends on DYNAMIC_FTRACE 6748da3821bSSteven Rostedt depends on HAVE_FTRACE_MCOUNT_RECORD 6758da3821bSSteven Rostedt 6763b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6773b15cdc1SSami Tolvanen bool 6783b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6793b15cdc1SSami Tolvanen 6803b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_CC 6813b15cdc1SSami Tolvanen def_bool y 6823b15cdc1SSami Tolvanen depends on $(cc-option,-mrecord-mcount) 6833b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6843b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6853b15cdc1SSami Tolvanen 68622c8542dSSami Tolvanenconfig FTRACE_MCOUNT_USE_OBJTOOL 68722c8542dSSami Tolvanen def_bool y 68822c8542dSSami Tolvanen depends on HAVE_OBJTOOL_MCOUNT 68922c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 69022c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 69122c8542dSSami Tolvanen depends on FTRACE_MCOUNT_RECORD 69222c8542dSSami Tolvanen 6933b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_RECORDMCOUNT 6943b15cdc1SSami Tolvanen def_bool y 6953b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6963b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 69722c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_OBJTOOL 6983b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6993b15cdc1SSami Tolvanen 70008d43a5fSTom Zanussiconfig TRACING_MAP 70108d43a5fSTom Zanussi bool 70208d43a5fSTom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 70308d43a5fSTom Zanussi help 70408d43a5fSTom Zanussi tracing_map is a special-purpose lock-free map for tracing, 70508d43a5fSTom Zanussi separated out as a stand-alone facility in order to allow it 70608d43a5fSTom Zanussi to be shared between multiple tracers. It isn't meant to be 70708d43a5fSTom Zanussi generally used outside of that context, and is normally 70808d43a5fSTom Zanussi selected by tracers that use it. 70908d43a5fSTom Zanussi 710726721a5STom Zanussiconfig SYNTH_EVENTS 711726721a5STom Zanussi bool "Synthetic trace events" 712726721a5STom Zanussi select TRACING 713726721a5STom Zanussi select DYNAMIC_EVENTS 714726721a5STom Zanussi default n 715726721a5STom Zanussi help 716726721a5STom Zanussi Synthetic events are user-defined trace events that can be 717726721a5STom Zanussi used to combine data from other trace events or in fact any 718726721a5STom Zanussi data source. Synthetic events can be generated indirectly 719726721a5STom Zanussi via the trace() action of histogram triggers or directly 720726721a5STom Zanussi by way of an in-kernel API. 721726721a5STom Zanussi 722726721a5STom Zanussi See Documentation/trace/events.rst or 723726721a5STom Zanussi Documentation/trace/histogram.rst for details and examples. 724726721a5STom Zanussi 725726721a5STom Zanussi If in doubt, say N. 726726721a5STom Zanussi 7277ef224d1STom Zanussiconfig HIST_TRIGGERS 7287ef224d1STom Zanussi bool "Histogram triggers" 7297ef224d1STom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 7307ef224d1STom Zanussi select TRACING_MAP 7317ad8fb61STom Zanussi select TRACING 7327bbab38dSMasami Hiramatsu select DYNAMIC_EVENTS 733726721a5STom Zanussi select SYNTH_EVENTS 7347ef224d1STom Zanussi default n 7357ef224d1STom Zanussi help 7367ef224d1STom Zanussi Hist triggers allow one or more arbitrary trace event fields 7377ef224d1STom Zanussi to be aggregated into hash tables and dumped to stdout by 7387ef224d1STom Zanussi reading a debugfs/tracefs file. They're useful for 7397ef224d1STom Zanussi gathering quick and dirty (though precise) summaries of 7407ef224d1STom Zanussi event activity as an initial guide for further investigation 7417ef224d1STom Zanussi using more advanced tools. 7427ef224d1STom Zanussi 74389e270c1STom Zanussi Inter-event tracing of quantities such as latencies is also 74489e270c1STom Zanussi supported using hist triggers under this option. 74589e270c1STom Zanussi 746ea272257SMauro Carvalho Chehab See Documentation/trace/histogram.rst. 7477ef224d1STom Zanussi If in doubt, say N. 7487ef224d1STom Zanussi 7496c3edaf9SCong Wangconfig TRACE_EVENT_INJECT 7506c3edaf9SCong Wang bool "Trace event injection" 7516c3edaf9SCong Wang depends on TRACING 7526c3edaf9SCong Wang help 7536c3edaf9SCong Wang Allow user-space to inject a specific trace event into the ring 7546c3edaf9SCong Wang buffer. This is mainly used for testing purpose. 7556c3edaf9SCong Wang 7566c3edaf9SCong Wang If unsure, say N. 7576c3edaf9SCong Wang 75881dc9f0eSSteven Rostedt (Red Hat)config TRACEPOINT_BENCHMARK 75981dc9f0eSSteven Rostedt (Red Hat) bool "Add tracepoint that benchmarks tracepoints" 76081dc9f0eSSteven Rostedt (Red Hat) help 76181dc9f0eSSteven Rostedt (Red Hat) This option creates the tracepoint "benchmark:benchmark_event". 76281dc9f0eSSteven Rostedt (Red Hat) When the tracepoint is enabled, it kicks off a kernel thread that 76369268094SRolf Eike Beer goes into an infinite loop (calling cond_resched() to let other tasks 76481dc9f0eSSteven Rostedt (Red Hat) run), and calls the tracepoint. Each iteration will record the time 76581dc9f0eSSteven Rostedt (Red Hat) it took to write to the tracepoint and the next iteration that 76681dc9f0eSSteven Rostedt (Red Hat) data will be passed to the tracepoint itself. That is, the tracepoint 76781dc9f0eSSteven Rostedt (Red Hat) will report the time it took to do the previous tracepoint. 76881dc9f0eSSteven Rostedt (Red Hat) The string written to the tracepoint is a static string of 128 bytes 76981dc9f0eSSteven Rostedt (Red Hat) to keep the time the same. The initial string is simply a write of 77081dc9f0eSSteven Rostedt (Red Hat) "START". The second string records the cold cache time of the first 77181dc9f0eSSteven Rostedt (Red Hat) write which is not added to the rest of the calculations. 77281dc9f0eSSteven Rostedt (Red Hat) 77381dc9f0eSSteven Rostedt (Red Hat) As it is a tight loop, it benchmarks as hot cache. That's fine because 77481dc9f0eSSteven Rostedt (Red Hat) we care most about hot paths that are probably in cache already. 77581dc9f0eSSteven Rostedt (Red Hat) 77681dc9f0eSSteven Rostedt (Red Hat) An example of the output: 77781dc9f0eSSteven Rostedt (Red Hat) 77881dc9f0eSSteven Rostedt (Red Hat) START 77981dc9f0eSSteven Rostedt (Red Hat) first=3672 [COLD CACHED] 78081dc9f0eSSteven Rostedt (Red Hat) last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712 78181dc9f0eSSteven Rostedt (Red Hat) last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337 78281dc9f0eSSteven Rostedt (Red Hat) last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064 78381dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411 78481dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389 78581dc9f0eSSteven Rostedt (Red Hat) last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666 78681dc9f0eSSteven Rostedt (Red Hat) 78781dc9f0eSSteven Rostedt (Red Hat) 7885092dbc9SSteven Rostedtconfig RING_BUFFER_BENCHMARK 7895092dbc9SSteven Rostedt tristate "Ring buffer benchmark stress tester" 7905092dbc9SSteven Rostedt depends on RING_BUFFER 7915092dbc9SSteven Rostedt help 7925092dbc9SSteven Rostedt This option creates a test to stress the ring buffer and benchmark it. 79340892367SRandy Dunlap It creates its own ring buffer such that it will not interfere with 7945092dbc9SSteven Rostedt any other users of the ring buffer (such as ftrace). It then creates 7955092dbc9SSteven Rostedt a producer and consumer that will run for 10 seconds and sleep for 7965092dbc9SSteven Rostedt 10 seconds. Each interval it will print out the number of events 7975092dbc9SSteven Rostedt it recorded and give a rough estimate of how long each iteration took. 7985092dbc9SSteven Rostedt 7995092dbc9SSteven Rostedt It does not disable interrupts or raise its priority, so it may be 8005092dbc9SSteven Rostedt affected by processes that are running. 8015092dbc9SSteven Rostedt 80240892367SRandy Dunlap If unsure, say N. 8035092dbc9SSteven Rostedt 8041e837945SSteven Rostedt (VMware)config TRACE_EVAL_MAP_FILE 8051e837945SSteven Rostedt (VMware) bool "Show eval mappings for trace events" 8061e837945SSteven Rostedt (VMware) depends on TRACING 8071e837945SSteven Rostedt (VMware) help 8081e837945SSteven Rostedt (VMware) The "print fmt" of the trace events will show the enum/sizeof names 8091e837945SSteven Rostedt (VMware) instead of their values. This can cause problems for user space tools 8101e837945SSteven Rostedt (VMware) that use this string to parse the raw data as user space does not know 8111e837945SSteven Rostedt (VMware) how to convert the string to its value. 8121e837945SSteven Rostedt (VMware) 8131e837945SSteven Rostedt (VMware) To fix this, there's a special macro in the kernel that can be used 8141e837945SSteven Rostedt (VMware) to convert an enum/sizeof into its value. If this macro is used, then 8151e837945SSteven Rostedt (VMware) the print fmt strings will be converted to their values. 8161e837945SSteven Rostedt (VMware) 8171e837945SSteven Rostedt (VMware) If something does not get converted properly, this option can be 8181e837945SSteven Rostedt (VMware) used to show what enums/sizeof the kernel tried to convert. 8191e837945SSteven Rostedt (VMware) 8201e837945SSteven Rostedt (VMware) This option is for debugging the conversions. A file is created 8211e837945SSteven Rostedt (VMware) in the tracing directory called "eval_map" that will show the 8221e837945SSteven Rostedt (VMware) names matched with their values and what trace event system they 8231e837945SSteven Rostedt (VMware) belong too. 8241e837945SSteven Rostedt (VMware) 8251e837945SSteven Rostedt (VMware) Normally, the mapping of the strings to values will be freed after 8261e837945SSteven Rostedt (VMware) boot up or module load. With this option, they will not be freed, as 8271e837945SSteven Rostedt (VMware) they are needed for the "eval_map" file. Enabling this option will 8281e837945SSteven Rostedt (VMware) increase the memory footprint of the running kernel. 8291e837945SSteven Rostedt (VMware) 8301e837945SSteven Rostedt (VMware) If unsure, say N. 8311e837945SSteven Rostedt (VMware) 832773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION 833773c1670SSteven Rostedt (VMware) bool "Record functions that recurse in function tracing" 834773c1670SSteven Rostedt (VMware) depends on FUNCTION_TRACER 835773c1670SSteven Rostedt (VMware) help 836773c1670SSteven Rostedt (VMware) All callbacks that attach to the function tracing have some sort 837773c1670SSteven Rostedt (VMware) of protection against recursion. Even though the protection exists, 838773c1670SSteven Rostedt (VMware) it adds overhead. This option will create a file in the tracefs 839773c1670SSteven Rostedt (VMware) file system called "recursed_functions" that will list the functions 840773c1670SSteven Rostedt (VMware) that triggered a recursion. 841773c1670SSteven Rostedt (VMware) 842773c1670SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 843773c1670SSteven Rostedt (VMware) 844773c1670SSteven Rostedt (VMware) If unsure, say N 845773c1670SSteven Rostedt (VMware) 846773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION_SIZE 847773c1670SSteven Rostedt (VMware) int "Max number of recursed functions to record" 848773c1670SSteven Rostedt (VMware) default 128 849773c1670SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 850773c1670SSteven Rostedt (VMware) help 851773c1670SSteven Rostedt (VMware) This defines the limit of number of functions that can be 852773c1670SSteven Rostedt (VMware) listed in the "recursed_functions" file, that lists all 853773c1670SSteven Rostedt (VMware) the functions that caused a recursion to happen. 854773c1670SSteven Rostedt (VMware) This file can be reset, but the limit can not change in 855773c1670SSteven Rostedt (VMware) size at runtime. 856773c1670SSteven Rostedt (VMware) 85728575c61SSteven Rostedt (VMware)config RING_BUFFER_RECORD_RECURSION 85828575c61SSteven Rostedt (VMware) bool "Record functions that recurse in the ring buffer" 85928575c61SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 86028575c61SSteven Rostedt (VMware) # default y, because it is coupled with FTRACE_RECORD_RECURSION 86128575c61SSteven Rostedt (VMware) default y 86228575c61SSteven Rostedt (VMware) help 86328575c61SSteven Rostedt (VMware) The ring buffer has its own internal recursion. Although when 86428575c61SSteven Rostedt (VMware) recursion happens it wont cause harm because of the protection, 86528575c61SSteven Rostedt (VMware) but it does cause an unwanted overhead. Enabling this option will 86628575c61SSteven Rostedt (VMware) place where recursion was detected into the ftrace "recursed_functions" 86728575c61SSteven Rostedt (VMware) file. 86828575c61SSteven Rostedt (VMware) 86928575c61SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 87028575c61SSteven Rostedt (VMware) 8711e837945SSteven Rostedt (VMware)config GCOV_PROFILE_FTRACE 8721e837945SSteven Rostedt (VMware) bool "Enable GCOV profiling on ftrace subsystem" 8731e837945SSteven Rostedt (VMware) depends on GCOV_KERNEL 8741e837945SSteven Rostedt (VMware) help 8751e837945SSteven Rostedt (VMware) Enable GCOV profiling on ftrace subsystem for checking 8761e837945SSteven Rostedt (VMware) which functions/lines are tested. 8771e837945SSteven Rostedt (VMware) 8781e837945SSteven Rostedt (VMware) If unsure, say N. 8791e837945SSteven Rostedt (VMware) 8801e837945SSteven Rostedt (VMware) Note that on a kernel compiled with this config, ftrace will 8811e837945SSteven Rostedt (VMware) run significantly slower. 8821e837945SSteven Rostedt (VMware) 8831e837945SSteven Rostedt (VMware)config FTRACE_SELFTEST 8841e837945SSteven Rostedt (VMware) bool 8851e837945SSteven Rostedt (VMware) 8861e837945SSteven Rostedt (VMware)config FTRACE_STARTUP_TEST 8871e837945SSteven Rostedt (VMware) bool "Perform a startup test on ftrace" 8881e837945SSteven Rostedt (VMware) depends on GENERIC_TRACER 8891e837945SSteven Rostedt (VMware) select FTRACE_SELFTEST 8901e837945SSteven Rostedt (VMware) help 8911e837945SSteven Rostedt (VMware) This option performs a series of startup tests on ftrace. On bootup 8921e837945SSteven Rostedt (VMware) a series of tests are made to verify that the tracer is 8931e837945SSteven Rostedt (VMware) functioning properly. It will do tests on all the configured 8941e837945SSteven Rostedt (VMware) tracers of ftrace. 8951e837945SSteven Rostedt (VMware) 8961e837945SSteven Rostedt (VMware)config EVENT_TRACE_STARTUP_TEST 8971e837945SSteven Rostedt (VMware) bool "Run selftest on trace events" 8981e837945SSteven Rostedt (VMware) depends on FTRACE_STARTUP_TEST 8991e837945SSteven Rostedt (VMware) default y 9001e837945SSteven Rostedt (VMware) help 9011e837945SSteven Rostedt (VMware) This option performs a test on all trace events in the system. 9021e837945SSteven Rostedt (VMware) It basically just enables each event and runs some code that 9031e837945SSteven Rostedt (VMware) will trigger events (not necessarily the event it enables) 9041e837945SSteven Rostedt (VMware) This may take some time run as there are a lot of events. 9051e837945SSteven Rostedt (VMware) 9061e837945SSteven Rostedt (VMware)config EVENT_TRACE_TEST_SYSCALLS 9071e837945SSteven Rostedt (VMware) bool "Run selftest on syscall events" 9081e837945SSteven Rostedt (VMware) depends on EVENT_TRACE_STARTUP_TEST 9091e837945SSteven Rostedt (VMware) help 9101e837945SSteven Rostedt (VMware) This option will also enable testing every syscall event. 9111e837945SSteven Rostedt (VMware) It only enables the event and disables it and runs various loads 9121e837945SSteven Rostedt (VMware) with the event enabled. This adds a bit more time for kernel boot 9131e837945SSteven Rostedt (VMware) up since it runs this on every system call defined. 9141e837945SSteven Rostedt (VMware) 9151e837945SSteven Rostedt (VMware) TBD - enable a way to actually call the syscalls as we test their 9161e837945SSteven Rostedt (VMware) events 9171e837945SSteven Rostedt (VMware) 9186c43e554SSteven Rostedt (Red Hat)config RING_BUFFER_STARTUP_TEST 9196c43e554SSteven Rostedt (Red Hat) bool "Ring buffer startup self test" 9206c43e554SSteven Rostedt (Red Hat) depends on RING_BUFFER 9216c43e554SSteven Rostedt (Red Hat) help 9226c43e554SSteven Rostedt (Red Hat) Run a simple self test on the ring buffer on boot up. Late in the 9236c43e554SSteven Rostedt (Red Hat) kernel boot sequence, the test will start that kicks off 9246c43e554SSteven Rostedt (Red Hat) a thread per cpu. Each thread will write various size events 9256c43e554SSteven Rostedt (Red Hat) into the ring buffer. Another thread is created to send IPIs 9266c43e554SSteven Rostedt (Red Hat) to each of the threads, where the IPI handler will also write 9276c43e554SSteven Rostedt (Red Hat) to the ring buffer, to test/stress the nesting ability. 9286c43e554SSteven Rostedt (Red Hat) If any anomalies are discovered, a warning will be displayed 9296c43e554SSteven Rostedt (Red Hat) and all ring buffers will be disabled. 9306c43e554SSteven Rostedt (Red Hat) 9316c43e554SSteven Rostedt (Red Hat) The test runs for 10 seconds. This will slow your boot time 9326c43e554SSteven Rostedt (Red Hat) by at least 10 more seconds. 9336c43e554SSteven Rostedt (Red Hat) 9346c43e554SSteven Rostedt (Red Hat) At the end of the test, statics and more checks are done. 9356c43e554SSteven Rostedt (Red Hat) It will output the stats of each per cpu buffer. What 9366c43e554SSteven Rostedt (Red Hat) was written, the sizes, what was read, what was lost, and 9376c43e554SSteven Rostedt (Red Hat) other similar details. 9386c43e554SSteven Rostedt (Red Hat) 9396c43e554SSteven Rostedt (Red Hat) If unsure, say N 9406c43e554SSteven Rostedt (Red Hat) 9415b7be9c7SSteven Rostedt (VMware)config RING_BUFFER_VALIDATE_TIME_DELTAS 9425b7be9c7SSteven Rostedt (VMware) bool "Verify ring buffer time stamp deltas" 9435b7be9c7SSteven Rostedt (VMware) depends on RING_BUFFER 9445b7be9c7SSteven Rostedt (VMware) help 9455b7be9c7SSteven Rostedt (VMware) This will audit the time stamps on the ring buffer sub 9465b7be9c7SSteven Rostedt (VMware) buffer to make sure that all the time deltas for the 9475b7be9c7SSteven Rostedt (VMware) events on a sub buffer matches the current time stamp. 9485b7be9c7SSteven Rostedt (VMware) This audit is performed for every event that is not 9495b7be9c7SSteven Rostedt (VMware) interrupted, or interrupting another event. A check 9505b7be9c7SSteven Rostedt (VMware) is also made when traversing sub buffers to make sure 9515b7be9c7SSteven Rostedt (VMware) that all the deltas on the previous sub buffer do not 9525b7be9c7SSteven Rostedt (VMware) add up to be greater than the current time stamp. 9535b7be9c7SSteven Rostedt (VMware) 9545b7be9c7SSteven Rostedt (VMware) NOTE: This adds significant overhead to recording of events, 9555b7be9c7SSteven Rostedt (VMware) and should only be used to test the logic of the ring buffer. 9565b7be9c7SSteven Rostedt (VMware) Do not use it on production systems. 9575b7be9c7SSteven Rostedt (VMware) 9585b7be9c7SSteven Rostedt (VMware) Only say Y if you understand what this does, and you 9595b7be9c7SSteven Rostedt (VMware) still want it enabled. Otherwise say N 9605b7be9c7SSteven Rostedt (VMware) 961a48fc4f5SSteven Rostedt (VMware)config MMIOTRACE_TEST 962a48fc4f5SSteven Rostedt (VMware) tristate "Test module for mmiotrace" 963a48fc4f5SSteven Rostedt (VMware) depends on MMIOTRACE && m 964a48fc4f5SSteven Rostedt (VMware) help 965a48fc4f5SSteven Rostedt (VMware) This is a dumb module for testing mmiotrace. It is very dangerous 966a48fc4f5SSteven Rostedt (VMware) as it will write garbage to IO memory starting at a given address. 967a48fc4f5SSteven Rostedt (VMware) However, it should be safe to use on e.g. unused portion of VRAM. 968a48fc4f5SSteven Rostedt (VMware) 969a48fc4f5SSteven Rostedt (VMware) Say N, unless you absolutely know what you are doing. 970a48fc4f5SSteven Rostedt (VMware) 971f96e8577SJoel Fernandes (Google)config PREEMPTIRQ_DELAY_TEST 972a48fc4f5SSteven Rostedt (VMware) tristate "Test module to create a preempt / IRQ disable delay thread to test latency tracers" 973f96e8577SJoel Fernandes (Google) depends on m 974f96e8577SJoel Fernandes (Google) help 975f96e8577SJoel Fernandes (Google) Select this option to build a test module that can help test latency 976f96e8577SJoel Fernandes (Google) tracers by executing a preempt or irq disable section with a user 977f96e8577SJoel Fernandes (Google) configurable delay. The module busy waits for the duration of the 978f96e8577SJoel Fernandes (Google) critical section. 979f96e8577SJoel Fernandes (Google) 98079393723SViktor Rosendahl (BMW) For example, the following invocation generates a burst of three 98179393723SViktor Rosendahl (BMW) irq-disabled critical sections for 500us: 98279393723SViktor Rosendahl (BMW) modprobe preemptirq_delay_test test_mode=irq delay=500 burst_size=3 983f96e8577SJoel Fernandes (Google) 9844b9091e1SSong Chen What's more, if you want to attach the test on the cpu which the latency 9854b9091e1SSong Chen tracer is running on, specify cpu_affinity=cpu_num at the end of the 9864b9091e1SSong Chen command. 9874b9091e1SSong Chen 988f96e8577SJoel Fernandes (Google) If unsure, say N 989f96e8577SJoel Fernandes (Google) 9909fe41efaSTom Zanussiconfig SYNTH_EVENT_GEN_TEST 9919fe41efaSTom Zanussi tristate "Test module for in-kernel synthetic event generation" 992726721a5STom Zanussi depends on SYNTH_EVENTS 9939fe41efaSTom Zanussi help 9949fe41efaSTom Zanussi This option creates a test module to check the base 9959fe41efaSTom Zanussi functionality of in-kernel synthetic event definition and 9969fe41efaSTom Zanussi generation. 9979fe41efaSTom Zanussi 9989fe41efaSTom Zanussi To test, insert the module, and then check the trace buffer 9999fe41efaSTom Zanussi for the generated sample events. 10009fe41efaSTom Zanussi 10019fe41efaSTom Zanussi If unsure, say N. 10029fe41efaSTom Zanussi 100364836248STom Zanussiconfig KPROBE_EVENT_GEN_TEST 100464836248STom Zanussi tristate "Test module for in-kernel kprobe event generation" 100564836248STom Zanussi depends on KPROBE_EVENTS 100664836248STom Zanussi help 100764836248STom Zanussi This option creates a test module to check the base 100864836248STom Zanussi functionality of in-kernel kprobe event definition. 100964836248STom Zanussi 101064836248STom Zanussi To test, insert the module, and then check the trace buffer 101164836248STom Zanussi for the generated kprobe events. 101264836248STom Zanussi 101364836248STom Zanussi If unsure, say N. 101464836248STom Zanussi 10152d19bd79STom Zanussiconfig HIST_TRIGGERS_DEBUG 10162d19bd79STom Zanussi bool "Hist trigger debug support" 10172d19bd79STom Zanussi depends on HIST_TRIGGERS 10182d19bd79STom Zanussi help 10192d19bd79STom Zanussi Add "hist_debug" file for each event, which when read will 10202d19bd79STom Zanussi dump out a bunch of internal details about the hist triggers 10212d19bd79STom Zanussi defined on that event. 10222d19bd79STom Zanussi 10232d19bd79STom Zanussi The hist_debug file serves a couple of purposes: 10242d19bd79STom Zanussi 10252d19bd79STom Zanussi - Helps developers verify that nothing is broken. 10262d19bd79STom Zanussi 10272d19bd79STom Zanussi - Provides educational information to support the details 10282d19bd79STom Zanussi of the hist trigger internals as described by 10292d19bd79STom Zanussi Documentation/trace/histogram-design.rst. 10302d19bd79STom Zanussi 10312d19bd79STom Zanussi The hist_debug output only covers the data structures 10322d19bd79STom Zanussi related to the histogram definitions themselves and doesn't 10332d19bd79STom Zanussi display the internals of map buckets or variable values of 10342d19bd79STom Zanussi running histograms. 10352d19bd79STom Zanussi 10362d19bd79STom Zanussi If unsure, say N. 10372d19bd79STom Zanussi 10384ed9f071SSteven Rostedtendif # FTRACE 1039