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 13840ada30fSIngo Molnarif TRACING_SUPPORT 13940ada30fSIngo Molnar 1404ed9f071SSteven Rostedtmenuconfig FTRACE 1414ed9f071SSteven Rostedt bool "Tracers" 14265b77242SSteven Rostedt default y if DEBUG_KERNEL 1434ed9f071SSteven Rostedt help 1444ed9f071SSteven Rostedt Enable the kernel tracing infrastructure. 1454ed9f071SSteven Rostedt 1464ed9f071SSteven Rostedtif FTRACE 14717d80fd0SPeter Zijlstra 1481e837945SSteven Rostedt (VMware)config BOOTTIME_TRACING 1491e837945SSteven Rostedt (VMware) bool "Boot-time Tracing support" 150d8a953ddSMasami Hiramatsu depends on TRACING 151d8a953ddSMasami Hiramatsu select BOOT_CONFIG 1521e837945SSteven Rostedt (VMware) help 1531e837945SSteven Rostedt (VMware) Enable developer to setup ftrace subsystem via supplemental 1541e837945SSteven Rostedt (VMware) kernel cmdline at boot time for debugging (tracing) driver 1551e837945SSteven Rostedt (VMware) initialization and boot process. 1561e837945SSteven Rostedt (VMware) 157606576ceSSteven Rostedtconfig FUNCTION_TRACER 1581b29b018SSteven Rostedt bool "Kernel Function Tracer" 159606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 1604d7a077cSSteven Rostedt select KALLSYMS 1615e0a0939SSteven Rostedt select GENERIC_TRACER 16235e8e302SSteven Rostedt select CONTEXT_SWITCH_TRACER 16360f1d5e3SMasami Hiramatsu select GLOB 16401b1d88bSThomas Gleixner select TASKS_RCU if PREEMPTION 165e5a971d7SPaul E. McKenney select TASKS_RUDE_RCU 1661b29b018SSteven Rostedt help 1671b29b018SSteven Rostedt Enable the kernel to trace every kernel function. This is done 1681b29b018SSteven Rostedt by using a compiler feature to insert a small, 5-byte No-Operation 16940892367SRandy Dunlap instruction at the beginning of every kernel function, which NOP 1701b29b018SSteven Rostedt sequence is then dynamically patched into a tracer call when 1711b29b018SSteven Rostedt tracing is enabled by the administrator. If it's runtime disabled 1721b29b018SSteven Rostedt (the bootup default), then the overhead of the instructions is very 1731b29b018SSteven Rostedt small and not measurable even in micro-benchmarks. 17435e8e302SSteven Rostedt 175fb52607aSFrederic Weisbeckerconfig FUNCTION_GRAPH_TRACER 176fb52607aSFrederic Weisbecker bool "Kernel Function Graph Tracer" 177fb52607aSFrederic Weisbecker depends on HAVE_FUNCTION_GRAPH_TRACER 17815e6cb36SFrederic Weisbecker depends on FUNCTION_TRACER 179eb4a0378SSteven Rostedt depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE 180764f3b95SIngo Molnar default y 18115e6cb36SFrederic Weisbecker help 182fb52607aSFrederic Weisbecker Enable the kernel to trace a function at both its return 183fb52607aSFrederic Weisbecker and its entry. 184692105b8SMatt LaPlante Its first purpose is to trace the duration of functions and 185692105b8SMatt LaPlante draw a call graph for each thread with some information like 186692105b8SMatt LaPlante the return value. This is done by setting the current return 187692105b8SMatt LaPlante address on the current task structure into a stack of calls. 18815e6cb36SFrederic Weisbecker 18961778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE 19061778cd7SSteven Rostedt (VMware) bool "enable/disable function tracing dynamically" 19161778cd7SSteven Rostedt (VMware) depends on FUNCTION_TRACER 19261778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE 19361778cd7SSteven Rostedt (VMware) default y 19461778cd7SSteven Rostedt (VMware) help 19561778cd7SSteven Rostedt (VMware) This option will modify all the calls to function tracing 19661778cd7SSteven Rostedt (VMware) dynamically (will patch them out of the binary image and 19761778cd7SSteven Rostedt (VMware) replace them with a No-Op instruction) on boot up. During 19861778cd7SSteven Rostedt (VMware) compile time, a table is made of all the locations that ftrace 19961778cd7SSteven Rostedt (VMware) can function trace, and this table is linked into the kernel 20061778cd7SSteven Rostedt (VMware) image. When this is enabled, functions can be individually 20161778cd7SSteven Rostedt (VMware) enabled, and the functions not enabled will not affect 20261778cd7SSteven Rostedt (VMware) performance of the system. 20361778cd7SSteven Rostedt (VMware) 20461778cd7SSteven Rostedt (VMware) See the files in /sys/kernel/debug/tracing: 20561778cd7SSteven Rostedt (VMware) available_filter_functions 20661778cd7SSteven Rostedt (VMware) set_ftrace_filter 20761778cd7SSteven Rostedt (VMware) set_ftrace_notrace 20861778cd7SSteven Rostedt (VMware) 20961778cd7SSteven Rostedt (VMware) This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but 21061778cd7SSteven Rostedt (VMware) otherwise has native performance as long as no tracing is active. 21161778cd7SSteven Rostedt (VMware) 21261778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE_WITH_REGS 21361778cd7SSteven Rostedt (VMware) def_bool y 21461778cd7SSteven Rostedt (VMware) depends on DYNAMIC_FTRACE 21561778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE_WITH_REGS 21661778cd7SSteven Rostedt (VMware) 21761778cd7SSteven Rostedt (VMware)config DYNAMIC_FTRACE_WITH_DIRECT_CALLS 21861778cd7SSteven Rostedt (VMware) def_bool y 21949a962c0SNaveen N. Rao depends on DYNAMIC_FTRACE_WITH_REGS 22061778cd7SSteven Rostedt (VMware) depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 22161778cd7SSteven Rostedt (VMware) 222*12f9951dSLukas Bulwahnconfig DYNAMIC_FTRACE_WITH_ARGS 223*12f9951dSLukas Bulwahn def_bool y 224*12f9951dSLukas Bulwahn depends on DYNAMIC_FTRACE 225*12f9951dSLukas Bulwahn depends on HAVE_DYNAMIC_FTRACE_WITH_ARGS 226*12f9951dSLukas Bulwahn 22761778cd7SSteven Rostedt (VMware)config FUNCTION_PROFILER 22861778cd7SSteven Rostedt (VMware) bool "Kernel function profiler" 22961778cd7SSteven Rostedt (VMware) depends on FUNCTION_TRACER 23061778cd7SSteven Rostedt (VMware) default n 23161778cd7SSteven Rostedt (VMware) help 23261778cd7SSteven Rostedt (VMware) This option enables the kernel function profiler. A file is created 23361778cd7SSteven Rostedt (VMware) in debugfs called function_profile_enabled which defaults to zero. 23461778cd7SSteven Rostedt (VMware) When a 1 is echoed into this file profiling begins, and when a 23561778cd7SSteven Rostedt (VMware) zero is entered, profiling stops. A "functions" file is created in 23661778cd7SSteven Rostedt (VMware) the trace_stat directory; this file shows the list of functions that 23761778cd7SSteven Rostedt (VMware) have been hit and their counters. 23861778cd7SSteven Rostedt (VMware) 23961778cd7SSteven Rostedt (VMware) If in doubt, say N. 24061778cd7SSteven Rostedt (VMware) 24161778cd7SSteven Rostedt (VMware)config STACK_TRACER 24261778cd7SSteven Rostedt (VMware) bool "Trace max stack" 24361778cd7SSteven Rostedt (VMware) depends on HAVE_FUNCTION_TRACER 24461778cd7SSteven Rostedt (VMware) select FUNCTION_TRACER 24561778cd7SSteven Rostedt (VMware) select STACKTRACE 24661778cd7SSteven Rostedt (VMware) select KALLSYMS 24761778cd7SSteven Rostedt (VMware) help 24861778cd7SSteven Rostedt (VMware) This special tracer records the maximum stack footprint of the 24961778cd7SSteven Rostedt (VMware) kernel and displays it in /sys/kernel/debug/tracing/stack_trace. 25061778cd7SSteven Rostedt (VMware) 25161778cd7SSteven Rostedt (VMware) This tracer works by hooking into every function call that the 25261778cd7SSteven Rostedt (VMware) kernel executes, and keeping a maximum stack depth value and 25361778cd7SSteven Rostedt (VMware) stack-trace saved. If this is configured with DYNAMIC_FTRACE 25461778cd7SSteven Rostedt (VMware) then it will not have any overhead while the stack tracer 25561778cd7SSteven Rostedt (VMware) is disabled. 25661778cd7SSteven Rostedt (VMware) 25761778cd7SSteven Rostedt (VMware) To enable the stack tracer on bootup, pass in 'stacktrace' 25861778cd7SSteven Rostedt (VMware) on the kernel command line. 25961778cd7SSteven Rostedt (VMware) 26061778cd7SSteven Rostedt (VMware) The stack tracer can also be enabled or disabled via the 26161778cd7SSteven Rostedt (VMware) sysctl kernel.stack_tracer_enabled 26261778cd7SSteven Rostedt (VMware) 26361778cd7SSteven Rostedt (VMware) Say N if unsure. 26461778cd7SSteven Rostedt (VMware) 265c3bc8fd6SJoel Fernandes (Google)config TRACE_PREEMPT_TOGGLE 266c3bc8fd6SJoel Fernandes (Google) bool 267c3bc8fd6SJoel Fernandes (Google) help 268c3bc8fd6SJoel Fernandes (Google) Enables hooks which will be called when preemption is first disabled, 269c3bc8fd6SJoel Fernandes (Google) and last enabled. 270bac429f0SSteven Rostedt 27181d68a96SSteven Rostedtconfig IRQSOFF_TRACER 27281d68a96SSteven Rostedt bool "Interrupts-off Latency Tracer" 27381d68a96SSteven Rostedt default n 27481d68a96SSteven Rostedt depends on TRACE_IRQFLAGS_SUPPORT 27581d68a96SSteven Rostedt select TRACE_IRQFLAGS 2765e0a0939SSteven Rostedt select GENERIC_TRACER 27781d68a96SSteven Rostedt select TRACER_MAX_TRACE 27885bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 27922cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 2800b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 28181d68a96SSteven Rostedt help 28281d68a96SSteven Rostedt This option measures the time spent in irqs-off critical 28381d68a96SSteven Rostedt sections, with microsecond accuracy. 28481d68a96SSteven Rostedt 28581d68a96SSteven Rostedt The default measurement method is a maximum search, which is 28681d68a96SSteven Rostedt disabled by default and can be runtime (re-)started 28781d68a96SSteven Rostedt via: 28881d68a96SSteven Rostedt 289156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 29081d68a96SSteven Rostedt 29140892367SRandy Dunlap (Note that kernel size and overhead increase with this option 2926cd8a4bbSSteven Rostedt enabled. This option and the preempt-off timing option can be 2936cd8a4bbSSteven Rostedt used together or separately.) 2946cd8a4bbSSteven Rostedt 2956cd8a4bbSSteven Rostedtconfig PREEMPT_TRACER 2966cd8a4bbSSteven Rostedt bool "Preemption-off Latency Tracer" 2976cd8a4bbSSteven Rostedt default n 29830c93704SThomas Gleixner depends on PREEMPTION 2995e0a0939SSteven Rostedt select GENERIC_TRACER 3006cd8a4bbSSteven Rostedt select TRACER_MAX_TRACE 30185bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 30222cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 3030b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 304c3bc8fd6SJoel Fernandes (Google) select TRACE_PREEMPT_TOGGLE 3056cd8a4bbSSteven Rostedt help 30640892367SRandy Dunlap This option measures the time spent in preemption-off critical 3076cd8a4bbSSteven Rostedt sections, with microsecond accuracy. 3086cd8a4bbSSteven Rostedt 3096cd8a4bbSSteven Rostedt The default measurement method is a maximum search, which is 3106cd8a4bbSSteven Rostedt disabled by default and can be runtime (re-)started 3116cd8a4bbSSteven Rostedt via: 3126cd8a4bbSSteven Rostedt 313156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 3146cd8a4bbSSteven Rostedt 31540892367SRandy Dunlap (Note that kernel size and overhead increase with this option 3166cd8a4bbSSteven Rostedt enabled. This option and the irqs-off timing option can be 3176cd8a4bbSSteven Rostedt used together or separately.) 3186cd8a4bbSSteven Rostedt 319352ad25aSSteven Rostedtconfig SCHED_TRACER 320352ad25aSSteven Rostedt bool "Scheduling Latency Tracer" 3215e0a0939SSteven Rostedt select GENERIC_TRACER 322352ad25aSSteven Rostedt select CONTEXT_SWITCH_TRACER 323352ad25aSSteven Rostedt select TRACER_MAX_TRACE 32422cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 325352ad25aSSteven Rostedt help 326352ad25aSSteven Rostedt This tracer tracks the latency of the highest priority task 327352ad25aSSteven Rostedt to be scheduled in, starting from the point it has woken up. 328352ad25aSSteven Rostedt 329e7c15cd8SSteven Rostedt (Red Hat)config HWLAT_TRACER 330e7c15cd8SSteven Rostedt (Red Hat) bool "Tracer to detect hardware latencies (like SMIs)" 331e7c15cd8SSteven Rostedt (Red Hat) select GENERIC_TRACER 332e7c15cd8SSteven Rostedt (Red Hat) help 333e7c15cd8SSteven Rostedt (Red Hat) This tracer, when enabled will create one or more kernel threads, 334c5c1ea75SJesper Dangaard Brouer depending on what the cpumask file is set to, which each thread 335e7c15cd8SSteven Rostedt (Red Hat) spinning in a loop looking for interruptions caused by 336e7c15cd8SSteven Rostedt (Red Hat) something other than the kernel. For example, if a 337e7c15cd8SSteven Rostedt (Red Hat) System Management Interrupt (SMI) takes a noticeable amount of 338e7c15cd8SSteven Rostedt (Red Hat) time, this tracer will detect it. This is useful for testing 339e7c15cd8SSteven Rostedt (Red Hat) if a system is reliable for Real Time tasks. 340e7c15cd8SSteven Rostedt (Red Hat) 341e7c15cd8SSteven Rostedt (Red Hat) Some files are created in the tracing directory when this 342e7c15cd8SSteven Rostedt (Red Hat) is enabled: 343e7c15cd8SSteven Rostedt (Red Hat) 344e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/width - time in usecs for how long to spin for 345e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/window - time in usecs between the start of each 346e7c15cd8SSteven Rostedt (Red Hat) iteration 347e7c15cd8SSteven Rostedt (Red Hat) 348e7c15cd8SSteven Rostedt (Red Hat) A kernel thread is created that will spin with interrupts disabled 349c5c1ea75SJesper Dangaard Brouer for "width" microseconds in every "window" cycle. It will not spin 350e7c15cd8SSteven Rostedt (Red Hat) for "window - width" microseconds, where the system can 351e7c15cd8SSteven Rostedt (Red Hat) continue to operate. 352e7c15cd8SSteven Rostedt (Red Hat) 353e7c15cd8SSteven Rostedt (Red Hat) The output will appear in the trace and trace_pipe files. 354e7c15cd8SSteven Rostedt (Red Hat) 355e7c15cd8SSteven Rostedt (Red Hat) When the tracer is not running, it has no affect on the system, 356e7c15cd8SSteven Rostedt (Red Hat) but when it is running, it can cause the system to be 357e7c15cd8SSteven Rostedt (Red Hat) periodically non responsive. Do not run this tracer on a 358e7c15cd8SSteven Rostedt (Red Hat) production system. 359e7c15cd8SSteven Rostedt (Red Hat) 360e7c15cd8SSteven Rostedt (Red Hat) To enable this tracer, echo in "hwlat" into the current_tracer 361e7c15cd8SSteven Rostedt (Red Hat) file. Every time a latency is greater than tracing_thresh, it will 362e7c15cd8SSteven Rostedt (Red Hat) be recorded into the ring buffer. 363e7c15cd8SSteven Rostedt (Red Hat) 364bce29ac9SDaniel Bristot de Oliveiraconfig OSNOISE_TRACER 365bce29ac9SDaniel Bristot de Oliveira bool "OS Noise tracer" 366bce29ac9SDaniel Bristot de Oliveira select GENERIC_TRACER 367bce29ac9SDaniel Bristot de Oliveira help 368bce29ac9SDaniel Bristot de Oliveira In the context of high-performance computing (HPC), the Operating 369bce29ac9SDaniel Bristot de Oliveira System Noise (osnoise) refers to the interference experienced by an 370bce29ac9SDaniel Bristot de Oliveira application due to activities inside the operating system. In the 371bce29ac9SDaniel Bristot de Oliveira context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread 372bce29ac9SDaniel Bristot de Oliveira can cause noise to the system. Moreover, hardware-related jobs can 373bce29ac9SDaniel Bristot de Oliveira also cause noise, for example, via SMIs. 374bce29ac9SDaniel Bristot de Oliveira 375bce29ac9SDaniel Bristot de Oliveira The osnoise tracer leverages the hwlat_detector by running a similar 376bce29ac9SDaniel Bristot de Oliveira loop with preemption, SoftIRQs and IRQs enabled, thus allowing all 377bce29ac9SDaniel Bristot de Oliveira the sources of osnoise during its execution. The osnoise tracer takes 378bce29ac9SDaniel Bristot de Oliveira note of the entry and exit point of any source of interferences, 379bce29ac9SDaniel Bristot de Oliveira increasing a per-cpu interference counter. It saves an interference 380bce29ac9SDaniel Bristot de Oliveira counter for each source of interference. The interference counter for 381bce29ac9SDaniel Bristot de Oliveira NMI, IRQs, SoftIRQs, and threads is increased anytime the tool 382bce29ac9SDaniel Bristot de Oliveira observes these interferences' entry events. When a noise happens 383bce29ac9SDaniel Bristot de Oliveira without any interference from the operating system level, the 384bce29ac9SDaniel Bristot de Oliveira hardware noise counter increases, pointing to a hardware-related 385bce29ac9SDaniel Bristot de Oliveira noise. In this way, osnoise can account for any source of 386bce29ac9SDaniel Bristot de Oliveira interference. At the end of the period, the osnoise tracer prints 387bce29ac9SDaniel Bristot de Oliveira the sum of all noise, the max single noise, the percentage of CPU 388bce29ac9SDaniel Bristot de Oliveira available for the thread, and the counters for the noise sources. 389bce29ac9SDaniel Bristot de Oliveira 390bce29ac9SDaniel Bristot de Oliveira In addition to the tracer, a set of tracepoints were added to 391bce29ac9SDaniel Bristot de Oliveira facilitate the identification of the osnoise source. 392bce29ac9SDaniel Bristot de Oliveira 393bce29ac9SDaniel Bristot de Oliveira The output will appear in the trace and trace_pipe files. 394bce29ac9SDaniel Bristot de Oliveira 395bce29ac9SDaniel Bristot de Oliveira To enable this tracer, echo in "osnoise" into the current_tracer 396bce29ac9SDaniel Bristot de Oliveira file. 397bce29ac9SDaniel Bristot de Oliveira 398a955d7eaSDaniel Bristot de Oliveiraconfig TIMERLAT_TRACER 399a955d7eaSDaniel Bristot de Oliveira bool "Timerlat tracer" 400a955d7eaSDaniel Bristot de Oliveira select OSNOISE_TRACER 401a955d7eaSDaniel Bristot de Oliveira select GENERIC_TRACER 402a955d7eaSDaniel Bristot de Oliveira help 403a955d7eaSDaniel Bristot de Oliveira The timerlat tracer aims to help the preemptive kernel developers 404a955d7eaSDaniel Bristot de Oliveira to find sources of wakeup latencies of real-time threads. 405a955d7eaSDaniel Bristot de Oliveira 406a955d7eaSDaniel Bristot de Oliveira The tracer creates a per-cpu kernel thread with real-time priority. 407a955d7eaSDaniel Bristot de Oliveira The tracer thread sets a periodic timer to wakeup itself, and goes 408a955d7eaSDaniel Bristot de Oliveira to sleep waiting for the timer to fire. At the wakeup, the thread 409a955d7eaSDaniel Bristot de Oliveira then computes a wakeup latency value as the difference between 410a955d7eaSDaniel Bristot de Oliveira the current time and the absolute time that the timer was set 411a955d7eaSDaniel Bristot de Oliveira to expire. 412a955d7eaSDaniel Bristot de Oliveira 413a955d7eaSDaniel Bristot de Oliveira The tracer prints two lines at every activation. The first is the 414a955d7eaSDaniel Bristot de Oliveira timer latency observed at the hardirq context before the 415a955d7eaSDaniel Bristot de Oliveira activation of the thread. The second is the timer latency observed 416a955d7eaSDaniel Bristot de Oliveira by the thread, which is the same level that cyclictest reports. The 417a955d7eaSDaniel Bristot de Oliveira ACTIVATION ID field serves to relate the irq execution to its 418a955d7eaSDaniel Bristot de Oliveira respective thread execution. 419a955d7eaSDaniel Bristot de Oliveira 420a955d7eaSDaniel Bristot de Oliveira The tracer is build on top of osnoise tracer, and the osnoise: 421a955d7eaSDaniel Bristot de Oliveira events can be used to trace the source of interference from NMI, 422a955d7eaSDaniel Bristot de Oliveira IRQs and other threads. It also enables the capture of the 423a955d7eaSDaniel Bristot de Oliveira stacktrace at the IRQ context, which helps to identify the code 424a955d7eaSDaniel Bristot de Oliveira path that can cause thread delay. 425a955d7eaSDaniel Bristot de Oliveira 42621b3ce30SSteven Rostedt (VMware)config MMIOTRACE 42721b3ce30SSteven Rostedt (VMware) bool "Memory mapped IO tracing" 42821b3ce30SSteven Rostedt (VMware) depends on HAVE_MMIOTRACE_SUPPORT && PCI 42921b3ce30SSteven Rostedt (VMware) select GENERIC_TRACER 43021b3ce30SSteven Rostedt (VMware) help 43121b3ce30SSteven Rostedt (VMware) Mmiotrace traces Memory Mapped I/O access and is meant for 43221b3ce30SSteven Rostedt (VMware) debugging and reverse engineering. It is called from the ioremap 43321b3ce30SSteven Rostedt (VMware) implementation and works via page faults. Tracing is disabled by 43421b3ce30SSteven Rostedt (VMware) default and can be enabled at run-time. 43521b3ce30SSteven Rostedt (VMware) 43621b3ce30SSteven Rostedt (VMware) See Documentation/trace/mmiotrace.rst. 43721b3ce30SSteven Rostedt (VMware) If you are not helping to develop drivers, say N. 43821b3ce30SSteven Rostedt (VMware) 439897f17a6SSteven Rostedtconfig ENABLE_DEFAULT_TRACERS 440897f17a6SSteven Rostedt bool "Trace process context switches and events" 4415e0a0939SSteven Rostedt depends on !GENERIC_TRACER 442b77e38aaSSteven Rostedt select TRACING 443b77e38aaSSteven Rostedt help 44440892367SRandy Dunlap This tracer hooks to various trace points in the kernel, 445b77e38aaSSteven Rostedt allowing the user to pick and choose which trace point they 446897f17a6SSteven Rostedt want to trace. It also includes the sched_switch tracer plugin. 447a7abe97fSSteven Rostedt 448ee08c6ecSFrederic Weisbeckerconfig FTRACE_SYSCALLS 449ee08c6ecSFrederic Weisbecker bool "Trace syscalls" 45066700001SJosh Stone depends on HAVE_SYSCALL_TRACEPOINTS 4515e0a0939SSteven Rostedt select GENERIC_TRACER 4520ea1c415SFrederic Weisbecker select KALLSYMS 453ee08c6ecSFrederic Weisbecker help 454ee08c6ecSFrederic Weisbecker Basic tracer to catch the syscall entry and exit events. 455ee08c6ecSFrederic Weisbecker 456debdd57fSHiraku Toyookaconfig TRACER_SNAPSHOT 457debdd57fSHiraku Toyooka bool "Create a snapshot trace buffer" 458debdd57fSHiraku Toyooka select TRACER_MAX_TRACE 459debdd57fSHiraku Toyooka help 460debdd57fSHiraku Toyooka Allow tracing users to take snapshot of the current buffer using the 461debdd57fSHiraku Toyooka ftrace interface, e.g.: 462debdd57fSHiraku Toyooka 463debdd57fSHiraku Toyooka echo 1 > /sys/kernel/debug/tracing/snapshot 464debdd57fSHiraku Toyooka cat snapshot 465debdd57fSHiraku Toyooka 4660b85ffc2SSteven Rostedt (Red Hat)config TRACER_SNAPSHOT_PER_CPU_SWAP 4670b85ffc2SSteven Rostedt (Red Hat) bool "Allow snapshot to swap per CPU" 4680b85ffc2SSteven Rostedt (Red Hat) depends on TRACER_SNAPSHOT 4690b85ffc2SSteven Rostedt (Red Hat) select RING_BUFFER_ALLOW_SWAP 4700b85ffc2SSteven Rostedt (Red Hat) help 4710b85ffc2SSteven Rostedt (Red Hat) Allow doing a snapshot of a single CPU buffer instead of a 4720b85ffc2SSteven Rostedt (Red Hat) full swap (all buffers). If this is set, then the following is 4730b85ffc2SSteven Rostedt (Red Hat) allowed: 4740b85ffc2SSteven Rostedt (Red Hat) 4750b85ffc2SSteven Rostedt (Red Hat) echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot 4760b85ffc2SSteven Rostedt (Red Hat) 4770b85ffc2SSteven Rostedt (Red Hat) After which, only the tracing buffer for CPU 2 was swapped with 4780b85ffc2SSteven Rostedt (Red Hat) the main tracing buffer, and the other CPU buffers remain the same. 4790b85ffc2SSteven Rostedt (Red Hat) 4800b85ffc2SSteven Rostedt (Red Hat) When this is enabled, this adds a little more overhead to the 4810b85ffc2SSteven Rostedt (Red Hat) trace recording, as it needs to add some checks to synchronize 4820b85ffc2SSteven Rostedt (Red Hat) recording with swaps. But this does not affect the performance 4830b85ffc2SSteven Rostedt (Red Hat) of the overall system. This is enabled by default when the preempt 4840b85ffc2SSteven Rostedt (Red Hat) or irq latency tracers are enabled, as those need to swap as well 4850b85ffc2SSteven Rostedt (Red Hat) and already adds the overhead (plus a lot more). 4860b85ffc2SSteven Rostedt (Red Hat) 4872ed84eebSSteven Rostedtconfig TRACE_BRANCH_PROFILING 4889ae5b879SSteven Rostedt bool 4895e0a0939SSteven Rostedt select GENERIC_TRACER 4909ae5b879SSteven Rostedt 4919ae5b879SSteven Rostedtchoice 4929ae5b879SSteven Rostedt prompt "Branch Profiling" 4939ae5b879SSteven Rostedt default BRANCH_PROFILE_NONE 4949ae5b879SSteven Rostedt help 4959ae5b879SSteven Rostedt The branch profiling is a software profiler. It will add hooks 4969ae5b879SSteven Rostedt into the C conditionals to test which path a branch takes. 4979ae5b879SSteven Rostedt 4989ae5b879SSteven Rostedt The likely/unlikely profiler only looks at the conditions that 4999ae5b879SSteven Rostedt are annotated with a likely or unlikely macro. 5009ae5b879SSteven Rostedt 50140892367SRandy Dunlap The "all branch" profiler will profile every if-statement in the 5029ae5b879SSteven Rostedt kernel. This profiler will also enable the likely/unlikely 50340892367SRandy Dunlap profiler. 5049ae5b879SSteven Rostedt 50540892367SRandy Dunlap Either of the above profilers adds a bit of overhead to the system. 50640892367SRandy Dunlap If unsure, choose "No branch profiling". 5079ae5b879SSteven Rostedt 5089ae5b879SSteven Rostedtconfig BRANCH_PROFILE_NONE 5099ae5b879SSteven Rostedt bool "No branch profiling" 5109ae5b879SSteven Rostedt help 5119ae5b879SSteven Rostedt No branch profiling. Branch profiling adds a bit of overhead. 5129ae5b879SSteven Rostedt Only enable it if you want to analyse the branching behavior. 5139ae5b879SSteven Rostedt Otherwise keep it disabled. 5149ae5b879SSteven Rostedt 5159ae5b879SSteven Rostedtconfig PROFILE_ANNOTATED_BRANCHES 5169ae5b879SSteven Rostedt bool "Trace likely/unlikely profiler" 5179ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5181f0d69a9SSteven Rostedt help 51959bf8964SMasanari Iida This tracer profiles all likely and unlikely macros 5201f0d69a9SSteven Rostedt in the kernel. It will display the results in: 5211f0d69a9SSteven Rostedt 52213e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_annotated 5231f0d69a9SSteven Rostedt 52440892367SRandy Dunlap Note: this will add a significant overhead; only turn this 5251f0d69a9SSteven Rostedt on if you need to profile the system's use of these macros. 5261f0d69a9SSteven Rostedt 5272bcd521aSSteven Rostedtconfig PROFILE_ALL_BRANCHES 52868e76e03SRandy Dunlap bool "Profile all if conditionals" if !FORTIFY_SOURCE 5299ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5302bcd521aSSteven Rostedt help 5312bcd521aSSteven Rostedt This tracer profiles all branch conditions. Every if () 5322bcd521aSSteven Rostedt taken in the kernel is recorded whether it hit or miss. 5332bcd521aSSteven Rostedt The results will be displayed in: 5342bcd521aSSteven Rostedt 53513e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_all 5362bcd521aSSteven Rostedt 5379ae5b879SSteven Rostedt This option also enables the likely/unlikely profiler. 5389ae5b879SSteven Rostedt 5392bcd521aSSteven Rostedt This configuration, when enabled, will impose a great overhead 5402bcd521aSSteven Rostedt on the system. This should only be enabled when the system 54140892367SRandy Dunlap is to be analyzed in much detail. 5429ae5b879SSteven Rostedtendchoice 5432bcd521aSSteven Rostedt 5442ed84eebSSteven Rostedtconfig TRACING_BRANCHES 54552f232cbSSteven Rostedt bool 54652f232cbSSteven Rostedt help 54752f232cbSSteven Rostedt Selected by tracers that will trace the likely and unlikely 54852f232cbSSteven Rostedt conditions. This prevents the tracers themselves from being 54952f232cbSSteven Rostedt profiled. Profiling the tracing infrastructure can only happen 55052f232cbSSteven Rostedt when the likelys and unlikelys are not being traced. 55152f232cbSSteven Rostedt 5522ed84eebSSteven Rostedtconfig BRANCH_TRACER 55352f232cbSSteven Rostedt bool "Trace likely/unlikely instances" 5542ed84eebSSteven Rostedt depends on TRACE_BRANCH_PROFILING 5552ed84eebSSteven Rostedt select TRACING_BRANCHES 55652f232cbSSteven Rostedt help 55752f232cbSSteven Rostedt This traces the events of likely and unlikely condition 55852f232cbSSteven Rostedt calls in the kernel. The difference between this and the 55952f232cbSSteven Rostedt "Trace likely/unlikely profiler" is that this is not a 56052f232cbSSteven Rostedt histogram of the callers, but actually places the calling 56152f232cbSSteven Rostedt events into a running trace buffer to see when and where the 56252f232cbSSteven Rostedt events happened, as well as their results. 56352f232cbSSteven Rostedt 56452f232cbSSteven Rostedt Say N if unsure. 56552f232cbSSteven Rostedt 5662db270a8SFrederic Weisbeckerconfig BLK_DEV_IO_TRACE 56740892367SRandy Dunlap bool "Support for tracing block IO actions" 5682db270a8SFrederic Weisbecker depends on SYSFS 5691dfba05dSIngo Molnar depends on BLOCK 5702db270a8SFrederic Weisbecker select RELAY 5712db270a8SFrederic Weisbecker select DEBUG_FS 5722db270a8SFrederic Weisbecker select TRACEPOINTS 5735e0a0939SSteven Rostedt select GENERIC_TRACER 5742db270a8SFrederic Weisbecker select STACKTRACE 5752db270a8SFrederic Weisbecker help 5762db270a8SFrederic Weisbecker Say Y here if you want to be able to trace the block layer actions 5772db270a8SFrederic Weisbecker on a given queue. Tracing allows you to see any traffic happening 5782db270a8SFrederic Weisbecker on a block device queue. For more information (and the userspace 5792db270a8SFrederic Weisbecker support tools needed), fetch the blktrace tools from: 5802db270a8SFrederic Weisbecker 5812db270a8SFrederic Weisbecker git://git.kernel.dk/blktrace.git 5822db270a8SFrederic Weisbecker 5832db270a8SFrederic Weisbecker Tracing also is possible using the ftrace interface, e.g.: 5842db270a8SFrederic Weisbecker 5852db270a8SFrederic Weisbecker echo 1 > /sys/block/sda/sda1/trace/enable 5862db270a8SFrederic Weisbecker echo blk > /sys/kernel/debug/tracing/current_tracer 5872db270a8SFrederic Weisbecker cat /sys/kernel/debug/tracing/trace_pipe 5882db270a8SFrederic Weisbecker 5892db270a8SFrederic Weisbecker If unsure, say N. 59036994e58SFrederic Weisbecker 5916b0b7551SAnton Blanchardconfig KPROBE_EVENTS 592413d37d1SMasami Hiramatsu depends on KPROBES 593f850c30cSHeiko Carstens depends on HAVE_REGS_AND_STACK_ACCESS_API 59477b44d1bSMasami Hiramatsu bool "Enable kprobes-based dynamic events" 595413d37d1SMasami Hiramatsu select TRACING 5968ab83f56SSrikar Dronamraju select PROBE_EVENTS 5976212dd29SMasami Hiramatsu select DYNAMIC_EVENTS 59877b44d1bSMasami Hiramatsu default y 599413d37d1SMasami Hiramatsu help 60040892367SRandy Dunlap This allows the user to add tracing events (similar to tracepoints) 60140892367SRandy Dunlap on the fly via the ftrace interface. See 6025fb94e9cSMauro Carvalho Chehab Documentation/trace/kprobetrace.rst for more details. 60377b44d1bSMasami Hiramatsu 60477b44d1bSMasami Hiramatsu Those events can be inserted wherever kprobes can probe, and record 60577b44d1bSMasami Hiramatsu various register and memory values. 60677b44d1bSMasami Hiramatsu 60740892367SRandy Dunlap This option is also required by perf-probe subcommand of perf tools. 60840892367SRandy Dunlap If you want to use perf tools, this option is strongly recommended. 609413d37d1SMasami Hiramatsu 61045408c4fSMasami Hiramatsuconfig KPROBE_EVENTS_ON_NOTRACE 61145408c4fSMasami Hiramatsu bool "Do NOT protect notrace function from kprobe events" 61245408c4fSMasami Hiramatsu depends on KPROBE_EVENTS 6137bb83f6fSMasami Hiramatsu depends on DYNAMIC_FTRACE 61445408c4fSMasami Hiramatsu default n 61545408c4fSMasami Hiramatsu help 61645408c4fSMasami Hiramatsu This is only for the developers who want to debug ftrace itself 61745408c4fSMasami Hiramatsu using kprobe events. 61845408c4fSMasami Hiramatsu 61945408c4fSMasami Hiramatsu If kprobes can use ftrace instead of breakpoint, ftrace related 62028cc65a1SColin Ian King functions are protected from kprobe-events to prevent an infinite 62145408c4fSMasami Hiramatsu recursion or any unexpected execution path which leads to a kernel 62245408c4fSMasami Hiramatsu crash. 62345408c4fSMasami Hiramatsu 62445408c4fSMasami Hiramatsu This option disables such protection and allows you to put kprobe 62545408c4fSMasami Hiramatsu events on ftrace functions for debugging ftrace by itself. 62645408c4fSMasami Hiramatsu Note that this might let you shoot yourself in the foot. 62745408c4fSMasami Hiramatsu 62845408c4fSMasami Hiramatsu If unsure, say N. 62945408c4fSMasami Hiramatsu 6306b0b7551SAnton Blanchardconfig UPROBE_EVENTS 631f3f096cfSSrikar Dronamraju bool "Enable uprobes-based dynamic events" 632f3f096cfSSrikar Dronamraju depends on ARCH_SUPPORTS_UPROBES 633f3f096cfSSrikar Dronamraju depends on MMU 63409294e31SDavid A. Long depends on PERF_EVENTS 635f3f096cfSSrikar Dronamraju select UPROBES 636f3f096cfSSrikar Dronamraju select PROBE_EVENTS 6370597c49cSMasami Hiramatsu select DYNAMIC_EVENTS 638f3f096cfSSrikar Dronamraju select TRACING 63961f35d75SArnaldo Carvalho de Melo default y 640f3f096cfSSrikar Dronamraju help 641f3f096cfSSrikar Dronamraju This allows the user to add tracing events on top of userspace 642f3f096cfSSrikar Dronamraju dynamic events (similar to tracepoints) on the fly via the trace 643f3f096cfSSrikar Dronamraju events interface. Those events can be inserted wherever uprobes 644f3f096cfSSrikar Dronamraju can probe, and record various registers. 645f3f096cfSSrikar Dronamraju This option is required if you plan to use perf-probe subcommand 646f3f096cfSSrikar Dronamraju of perf tools on user space applications. 647f3f096cfSSrikar Dronamraju 648e1abf2ccSIngo Molnarconfig BPF_EVENTS 649e1abf2ccSIngo Molnar depends on BPF_SYSCALL 6506b0b7551SAnton Blanchard depends on (KPROBE_EVENTS || UPROBE_EVENTS) && PERF_EVENTS 651e1abf2ccSIngo Molnar bool 652e1abf2ccSIngo Molnar default y 653e1abf2ccSIngo Molnar help 6545cbd22c1SPeter Wu This allows the user to attach BPF programs to kprobe, uprobe, and 6555cbd22c1SPeter Wu tracepoint events. 656e1abf2ccSIngo Molnar 6575448d44cSMasami Hiramatsuconfig DYNAMIC_EVENTS 6585448d44cSMasami Hiramatsu def_bool n 6595448d44cSMasami Hiramatsu 6608ab83f56SSrikar Dronamrajuconfig PROBE_EVENTS 6618ab83f56SSrikar Dronamraju def_bool n 6628ab83f56SSrikar Dronamraju 6639802d865SJosef Bacikconfig BPF_KPROBE_OVERRIDE 6649802d865SJosef Bacik bool "Enable BPF programs to override a kprobed function" 6659802d865SJosef Bacik depends on BPF_EVENTS 666540adea3SMasami Hiramatsu depends on FUNCTION_ERROR_INJECTION 6679802d865SJosef Bacik default n 6689802d865SJosef Bacik help 6699802d865SJosef Bacik Allows BPF to override the execution of a probed function and 6709802d865SJosef Bacik set a different return value. This is used for error injection. 6719802d865SJosef Bacik 6728da3821bSSteven Rostedtconfig FTRACE_MCOUNT_RECORD 6738da3821bSSteven Rostedt def_bool y 6748da3821bSSteven Rostedt depends on DYNAMIC_FTRACE 6758da3821bSSteven Rostedt depends on HAVE_FTRACE_MCOUNT_RECORD 6768da3821bSSteven Rostedt 6773b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6783b15cdc1SSami Tolvanen bool 6793b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6803b15cdc1SSami Tolvanen 6813b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_CC 6823b15cdc1SSami Tolvanen def_bool y 6833b15cdc1SSami Tolvanen depends on $(cc-option,-mrecord-mcount) 6843b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6853b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6863b15cdc1SSami Tolvanen 68722c8542dSSami Tolvanenconfig FTRACE_MCOUNT_USE_OBJTOOL 68822c8542dSSami Tolvanen def_bool y 68922c8542dSSami Tolvanen depends on HAVE_OBJTOOL_MCOUNT 69022c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 69122c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 69222c8542dSSami Tolvanen depends on FTRACE_MCOUNT_RECORD 69322c8542dSSami Tolvanen 6943b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_RECORDMCOUNT 6953b15cdc1SSami Tolvanen def_bool y 6963b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6973b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 69822c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_OBJTOOL 6993b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 7003b15cdc1SSami Tolvanen 70108d43a5fSTom Zanussiconfig TRACING_MAP 70208d43a5fSTom Zanussi bool 70308d43a5fSTom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 70408d43a5fSTom Zanussi help 70508d43a5fSTom Zanussi tracing_map is a special-purpose lock-free map for tracing, 70608d43a5fSTom Zanussi separated out as a stand-alone facility in order to allow it 70708d43a5fSTom Zanussi to be shared between multiple tracers. It isn't meant to be 70808d43a5fSTom Zanussi generally used outside of that context, and is normally 70908d43a5fSTom Zanussi selected by tracers that use it. 71008d43a5fSTom Zanussi 711726721a5STom Zanussiconfig SYNTH_EVENTS 712726721a5STom Zanussi bool "Synthetic trace events" 713726721a5STom Zanussi select TRACING 714726721a5STom Zanussi select DYNAMIC_EVENTS 715726721a5STom Zanussi default n 716726721a5STom Zanussi help 717726721a5STom Zanussi Synthetic events are user-defined trace events that can be 718726721a5STom Zanussi used to combine data from other trace events or in fact any 719726721a5STom Zanussi data source. Synthetic events can be generated indirectly 720726721a5STom Zanussi via the trace() action of histogram triggers or directly 721726721a5STom Zanussi by way of an in-kernel API. 722726721a5STom Zanussi 723726721a5STom Zanussi See Documentation/trace/events.rst or 724726721a5STom Zanussi Documentation/trace/histogram.rst for details and examples. 725726721a5STom Zanussi 726726721a5STom Zanussi If in doubt, say N. 727726721a5STom Zanussi 7287ef224d1STom Zanussiconfig HIST_TRIGGERS 7297ef224d1STom Zanussi bool "Histogram triggers" 7307ef224d1STom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 7317ef224d1STom Zanussi select TRACING_MAP 7327ad8fb61STom Zanussi select TRACING 7337bbab38dSMasami Hiramatsu select DYNAMIC_EVENTS 734726721a5STom Zanussi select SYNTH_EVENTS 7357ef224d1STom Zanussi default n 7367ef224d1STom Zanussi help 7377ef224d1STom Zanussi Hist triggers allow one or more arbitrary trace event fields 7387ef224d1STom Zanussi to be aggregated into hash tables and dumped to stdout by 7397ef224d1STom Zanussi reading a debugfs/tracefs file. They're useful for 7407ef224d1STom Zanussi gathering quick and dirty (though precise) summaries of 7417ef224d1STom Zanussi event activity as an initial guide for further investigation 7427ef224d1STom Zanussi using more advanced tools. 7437ef224d1STom Zanussi 74489e270c1STom Zanussi Inter-event tracing of quantities such as latencies is also 74589e270c1STom Zanussi supported using hist triggers under this option. 74689e270c1STom Zanussi 747ea272257SMauro Carvalho Chehab See Documentation/trace/histogram.rst. 7487ef224d1STom Zanussi If in doubt, say N. 7497ef224d1STom Zanussi 7506c3edaf9SCong Wangconfig TRACE_EVENT_INJECT 7516c3edaf9SCong Wang bool "Trace event injection" 7526c3edaf9SCong Wang depends on TRACING 7536c3edaf9SCong Wang help 7546c3edaf9SCong Wang Allow user-space to inject a specific trace event into the ring 7556c3edaf9SCong Wang buffer. This is mainly used for testing purpose. 7566c3edaf9SCong Wang 7576c3edaf9SCong Wang If unsure, say N. 7586c3edaf9SCong Wang 75981dc9f0eSSteven Rostedt (Red Hat)config TRACEPOINT_BENCHMARK 76081dc9f0eSSteven Rostedt (Red Hat) bool "Add tracepoint that benchmarks tracepoints" 76181dc9f0eSSteven Rostedt (Red Hat) help 76281dc9f0eSSteven Rostedt (Red Hat) This option creates the tracepoint "benchmark:benchmark_event". 76381dc9f0eSSteven Rostedt (Red Hat) When the tracepoint is enabled, it kicks off a kernel thread that 76469268094SRolf Eike Beer goes into an infinite loop (calling cond_resched() to let other tasks 76581dc9f0eSSteven Rostedt (Red Hat) run), and calls the tracepoint. Each iteration will record the time 76681dc9f0eSSteven Rostedt (Red Hat) it took to write to the tracepoint and the next iteration that 76781dc9f0eSSteven Rostedt (Red Hat) data will be passed to the tracepoint itself. That is, the tracepoint 76881dc9f0eSSteven Rostedt (Red Hat) will report the time it took to do the previous tracepoint. 76981dc9f0eSSteven Rostedt (Red Hat) The string written to the tracepoint is a static string of 128 bytes 77081dc9f0eSSteven Rostedt (Red Hat) to keep the time the same. The initial string is simply a write of 77181dc9f0eSSteven Rostedt (Red Hat) "START". The second string records the cold cache time of the first 77281dc9f0eSSteven Rostedt (Red Hat) write which is not added to the rest of the calculations. 77381dc9f0eSSteven Rostedt (Red Hat) 77481dc9f0eSSteven Rostedt (Red Hat) As it is a tight loop, it benchmarks as hot cache. That's fine because 77581dc9f0eSSteven Rostedt (Red Hat) we care most about hot paths that are probably in cache already. 77681dc9f0eSSteven Rostedt (Red Hat) 77781dc9f0eSSteven Rostedt (Red Hat) An example of the output: 77881dc9f0eSSteven Rostedt (Red Hat) 77981dc9f0eSSteven Rostedt (Red Hat) START 78081dc9f0eSSteven Rostedt (Red Hat) first=3672 [COLD CACHED] 78181dc9f0eSSteven Rostedt (Red Hat) last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712 78281dc9f0eSSteven Rostedt (Red Hat) last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337 78381dc9f0eSSteven Rostedt (Red Hat) last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064 78481dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411 78581dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389 78681dc9f0eSSteven Rostedt (Red Hat) last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666 78781dc9f0eSSteven Rostedt (Red Hat) 78881dc9f0eSSteven Rostedt (Red Hat) 7895092dbc9SSteven Rostedtconfig RING_BUFFER_BENCHMARK 7905092dbc9SSteven Rostedt tristate "Ring buffer benchmark stress tester" 7915092dbc9SSteven Rostedt depends on RING_BUFFER 7925092dbc9SSteven Rostedt help 7935092dbc9SSteven Rostedt This option creates a test to stress the ring buffer and benchmark it. 79440892367SRandy Dunlap It creates its own ring buffer such that it will not interfere with 7955092dbc9SSteven Rostedt any other users of the ring buffer (such as ftrace). It then creates 7965092dbc9SSteven Rostedt a producer and consumer that will run for 10 seconds and sleep for 7975092dbc9SSteven Rostedt 10 seconds. Each interval it will print out the number of events 7985092dbc9SSteven Rostedt it recorded and give a rough estimate of how long each iteration took. 7995092dbc9SSteven Rostedt 8005092dbc9SSteven Rostedt It does not disable interrupts or raise its priority, so it may be 8015092dbc9SSteven Rostedt affected by processes that are running. 8025092dbc9SSteven Rostedt 80340892367SRandy Dunlap If unsure, say N. 8045092dbc9SSteven Rostedt 8051e837945SSteven Rostedt (VMware)config TRACE_EVAL_MAP_FILE 8061e837945SSteven Rostedt (VMware) bool "Show eval mappings for trace events" 8071e837945SSteven Rostedt (VMware) depends on TRACING 8081e837945SSteven Rostedt (VMware) help 8091e837945SSteven Rostedt (VMware) The "print fmt" of the trace events will show the enum/sizeof names 8101e837945SSteven Rostedt (VMware) instead of their values. This can cause problems for user space tools 8111e837945SSteven Rostedt (VMware) that use this string to parse the raw data as user space does not know 8121e837945SSteven Rostedt (VMware) how to convert the string to its value. 8131e837945SSteven Rostedt (VMware) 8141e837945SSteven Rostedt (VMware) To fix this, there's a special macro in the kernel that can be used 8151e837945SSteven Rostedt (VMware) to convert an enum/sizeof into its value. If this macro is used, then 8161e837945SSteven Rostedt (VMware) the print fmt strings will be converted to their values. 8171e837945SSteven Rostedt (VMware) 8181e837945SSteven Rostedt (VMware) If something does not get converted properly, this option can be 8191e837945SSteven Rostedt (VMware) used to show what enums/sizeof the kernel tried to convert. 8201e837945SSteven Rostedt (VMware) 8211e837945SSteven Rostedt (VMware) This option is for debugging the conversions. A file is created 8221e837945SSteven Rostedt (VMware) in the tracing directory called "eval_map" that will show the 8231e837945SSteven Rostedt (VMware) names matched with their values and what trace event system they 8241e837945SSteven Rostedt (VMware) belong too. 8251e837945SSteven Rostedt (VMware) 8261e837945SSteven Rostedt (VMware) Normally, the mapping of the strings to values will be freed after 8271e837945SSteven Rostedt (VMware) boot up or module load. With this option, they will not be freed, as 8281e837945SSteven Rostedt (VMware) they are needed for the "eval_map" file. Enabling this option will 8291e837945SSteven Rostedt (VMware) increase the memory footprint of the running kernel. 8301e837945SSteven Rostedt (VMware) 8311e837945SSteven Rostedt (VMware) If unsure, say N. 8321e837945SSteven Rostedt (VMware) 833773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION 834773c1670SSteven Rostedt (VMware) bool "Record functions that recurse in function tracing" 835773c1670SSteven Rostedt (VMware) depends on FUNCTION_TRACER 836773c1670SSteven Rostedt (VMware) help 837773c1670SSteven Rostedt (VMware) All callbacks that attach to the function tracing have some sort 838773c1670SSteven Rostedt (VMware) of protection against recursion. Even though the protection exists, 839773c1670SSteven Rostedt (VMware) it adds overhead. This option will create a file in the tracefs 840773c1670SSteven Rostedt (VMware) file system called "recursed_functions" that will list the functions 841773c1670SSteven Rostedt (VMware) that triggered a recursion. 842773c1670SSteven Rostedt (VMware) 843773c1670SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 844773c1670SSteven Rostedt (VMware) 845773c1670SSteven Rostedt (VMware) If unsure, say N 846773c1670SSteven Rostedt (VMware) 847773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION_SIZE 848773c1670SSteven Rostedt (VMware) int "Max number of recursed functions to record" 849773c1670SSteven Rostedt (VMware) default 128 850773c1670SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 851773c1670SSteven Rostedt (VMware) help 852773c1670SSteven Rostedt (VMware) This defines the limit of number of functions that can be 853773c1670SSteven Rostedt (VMware) listed in the "recursed_functions" file, that lists all 854773c1670SSteven Rostedt (VMware) the functions that caused a recursion to happen. 855773c1670SSteven Rostedt (VMware) This file can be reset, but the limit can not change in 856773c1670SSteven Rostedt (VMware) size at runtime. 857773c1670SSteven Rostedt (VMware) 85828575c61SSteven Rostedt (VMware)config RING_BUFFER_RECORD_RECURSION 85928575c61SSteven Rostedt (VMware) bool "Record functions that recurse in the ring buffer" 86028575c61SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 86128575c61SSteven Rostedt (VMware) # default y, because it is coupled with FTRACE_RECORD_RECURSION 86228575c61SSteven Rostedt (VMware) default y 86328575c61SSteven Rostedt (VMware) help 86428575c61SSteven Rostedt (VMware) The ring buffer has its own internal recursion. Although when 86528575c61SSteven Rostedt (VMware) recursion happens it wont cause harm because of the protection, 86628575c61SSteven Rostedt (VMware) but it does cause an unwanted overhead. Enabling this option will 86728575c61SSteven Rostedt (VMware) place where recursion was detected into the ftrace "recursed_functions" 86828575c61SSteven Rostedt (VMware) file. 86928575c61SSteven Rostedt (VMware) 87028575c61SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 87128575c61SSteven Rostedt (VMware) 8721e837945SSteven Rostedt (VMware)config GCOV_PROFILE_FTRACE 8731e837945SSteven Rostedt (VMware) bool "Enable GCOV profiling on ftrace subsystem" 8741e837945SSteven Rostedt (VMware) depends on GCOV_KERNEL 8751e837945SSteven Rostedt (VMware) help 8761e837945SSteven Rostedt (VMware) Enable GCOV profiling on ftrace subsystem for checking 8771e837945SSteven Rostedt (VMware) which functions/lines are tested. 8781e837945SSteven Rostedt (VMware) 8791e837945SSteven Rostedt (VMware) If unsure, say N. 8801e837945SSteven Rostedt (VMware) 8811e837945SSteven Rostedt (VMware) Note that on a kernel compiled with this config, ftrace will 8821e837945SSteven Rostedt (VMware) run significantly slower. 8831e837945SSteven Rostedt (VMware) 8841e837945SSteven Rostedt (VMware)config FTRACE_SELFTEST 8851e837945SSteven Rostedt (VMware) bool 8861e837945SSteven Rostedt (VMware) 8871e837945SSteven Rostedt (VMware)config FTRACE_STARTUP_TEST 8881e837945SSteven Rostedt (VMware) bool "Perform a startup test on ftrace" 8891e837945SSteven Rostedt (VMware) depends on GENERIC_TRACER 8901e837945SSteven Rostedt (VMware) select FTRACE_SELFTEST 8911e837945SSteven Rostedt (VMware) help 8921e837945SSteven Rostedt (VMware) This option performs a series of startup tests on ftrace. On bootup 8931e837945SSteven Rostedt (VMware) a series of tests are made to verify that the tracer is 8941e837945SSteven Rostedt (VMware) functioning properly. It will do tests on all the configured 8951e837945SSteven Rostedt (VMware) tracers of ftrace. 8961e837945SSteven Rostedt (VMware) 8971e837945SSteven Rostedt (VMware)config EVENT_TRACE_STARTUP_TEST 8981e837945SSteven Rostedt (VMware) bool "Run selftest on trace events" 8991e837945SSteven Rostedt (VMware) depends on FTRACE_STARTUP_TEST 9001e837945SSteven Rostedt (VMware) default y 9011e837945SSteven Rostedt (VMware) help 9021e837945SSteven Rostedt (VMware) This option performs a test on all trace events in the system. 9031e837945SSteven Rostedt (VMware) It basically just enables each event and runs some code that 9041e837945SSteven Rostedt (VMware) will trigger events (not necessarily the event it enables) 9051e837945SSteven Rostedt (VMware) This may take some time run as there are a lot of events. 9061e837945SSteven Rostedt (VMware) 9071e837945SSteven Rostedt (VMware)config EVENT_TRACE_TEST_SYSCALLS 9081e837945SSteven Rostedt (VMware) bool "Run selftest on syscall events" 9091e837945SSteven Rostedt (VMware) depends on EVENT_TRACE_STARTUP_TEST 9101e837945SSteven Rostedt (VMware) help 9111e837945SSteven Rostedt (VMware) This option will also enable testing every syscall event. 9121e837945SSteven Rostedt (VMware) It only enables the event and disables it and runs various loads 9131e837945SSteven Rostedt (VMware) with the event enabled. This adds a bit more time for kernel boot 9141e837945SSteven Rostedt (VMware) up since it runs this on every system call defined. 9151e837945SSteven Rostedt (VMware) 9161e837945SSteven Rostedt (VMware) TBD - enable a way to actually call the syscalls as we test their 9171e837945SSteven Rostedt (VMware) events 9181e837945SSteven Rostedt (VMware) 9196c43e554SSteven Rostedt (Red Hat)config RING_BUFFER_STARTUP_TEST 9206c43e554SSteven Rostedt (Red Hat) bool "Ring buffer startup self test" 9216c43e554SSteven Rostedt (Red Hat) depends on RING_BUFFER 9226c43e554SSteven Rostedt (Red Hat) help 9236c43e554SSteven Rostedt (Red Hat) Run a simple self test on the ring buffer on boot up. Late in the 9246c43e554SSteven Rostedt (Red Hat) kernel boot sequence, the test will start that kicks off 9256c43e554SSteven Rostedt (Red Hat) a thread per cpu. Each thread will write various size events 9266c43e554SSteven Rostedt (Red Hat) into the ring buffer. Another thread is created to send IPIs 9276c43e554SSteven Rostedt (Red Hat) to each of the threads, where the IPI handler will also write 9286c43e554SSteven Rostedt (Red Hat) to the ring buffer, to test/stress the nesting ability. 9296c43e554SSteven Rostedt (Red Hat) If any anomalies are discovered, a warning will be displayed 9306c43e554SSteven Rostedt (Red Hat) and all ring buffers will be disabled. 9316c43e554SSteven Rostedt (Red Hat) 9326c43e554SSteven Rostedt (Red Hat) The test runs for 10 seconds. This will slow your boot time 9336c43e554SSteven Rostedt (Red Hat) by at least 10 more seconds. 9346c43e554SSteven Rostedt (Red Hat) 9356c43e554SSteven Rostedt (Red Hat) At the end of the test, statics and more checks are done. 9366c43e554SSteven Rostedt (Red Hat) It will output the stats of each per cpu buffer. What 9376c43e554SSteven Rostedt (Red Hat) was written, the sizes, what was read, what was lost, and 9386c43e554SSteven Rostedt (Red Hat) other similar details. 9396c43e554SSteven Rostedt (Red Hat) 9406c43e554SSteven Rostedt (Red Hat) If unsure, say N 9416c43e554SSteven Rostedt (Red Hat) 9425b7be9c7SSteven Rostedt (VMware)config RING_BUFFER_VALIDATE_TIME_DELTAS 9435b7be9c7SSteven Rostedt (VMware) bool "Verify ring buffer time stamp deltas" 9445b7be9c7SSteven Rostedt (VMware) depends on RING_BUFFER 9455b7be9c7SSteven Rostedt (VMware) help 9465b7be9c7SSteven Rostedt (VMware) This will audit the time stamps on the ring buffer sub 9475b7be9c7SSteven Rostedt (VMware) buffer to make sure that all the time deltas for the 9485b7be9c7SSteven Rostedt (VMware) events on a sub buffer matches the current time stamp. 9495b7be9c7SSteven Rostedt (VMware) This audit is performed for every event that is not 9505b7be9c7SSteven Rostedt (VMware) interrupted, or interrupting another event. A check 9515b7be9c7SSteven Rostedt (VMware) is also made when traversing sub buffers to make sure 9525b7be9c7SSteven Rostedt (VMware) that all the deltas on the previous sub buffer do not 9535b7be9c7SSteven Rostedt (VMware) add up to be greater than the current time stamp. 9545b7be9c7SSteven Rostedt (VMware) 9555b7be9c7SSteven Rostedt (VMware) NOTE: This adds significant overhead to recording of events, 9565b7be9c7SSteven Rostedt (VMware) and should only be used to test the logic of the ring buffer. 9575b7be9c7SSteven Rostedt (VMware) Do not use it on production systems. 9585b7be9c7SSteven Rostedt (VMware) 9595b7be9c7SSteven Rostedt (VMware) Only say Y if you understand what this does, and you 9605b7be9c7SSteven Rostedt (VMware) still want it enabled. Otherwise say N 9615b7be9c7SSteven Rostedt (VMware) 962a48fc4f5SSteven Rostedt (VMware)config MMIOTRACE_TEST 963a48fc4f5SSteven Rostedt (VMware) tristate "Test module for mmiotrace" 964a48fc4f5SSteven Rostedt (VMware) depends on MMIOTRACE && m 965a48fc4f5SSteven Rostedt (VMware) help 966a48fc4f5SSteven Rostedt (VMware) This is a dumb module for testing mmiotrace. It is very dangerous 967a48fc4f5SSteven Rostedt (VMware) as it will write garbage to IO memory starting at a given address. 968a48fc4f5SSteven Rostedt (VMware) However, it should be safe to use on e.g. unused portion of VRAM. 969a48fc4f5SSteven Rostedt (VMware) 970a48fc4f5SSteven Rostedt (VMware) Say N, unless you absolutely know what you are doing. 971a48fc4f5SSteven Rostedt (VMware) 972f96e8577SJoel Fernandes (Google)config PREEMPTIRQ_DELAY_TEST 973a48fc4f5SSteven Rostedt (VMware) tristate "Test module to create a preempt / IRQ disable delay thread to test latency tracers" 974f96e8577SJoel Fernandes (Google) depends on m 975f96e8577SJoel Fernandes (Google) help 976f96e8577SJoel Fernandes (Google) Select this option to build a test module that can help test latency 977f96e8577SJoel Fernandes (Google) tracers by executing a preempt or irq disable section with a user 978f96e8577SJoel Fernandes (Google) configurable delay. The module busy waits for the duration of the 979f96e8577SJoel Fernandes (Google) critical section. 980f96e8577SJoel Fernandes (Google) 98179393723SViktor Rosendahl (BMW) For example, the following invocation generates a burst of three 98279393723SViktor Rosendahl (BMW) irq-disabled critical sections for 500us: 98379393723SViktor Rosendahl (BMW) modprobe preemptirq_delay_test test_mode=irq delay=500 burst_size=3 984f96e8577SJoel Fernandes (Google) 9854b9091e1SSong Chen What's more, if you want to attach the test on the cpu which the latency 9864b9091e1SSong Chen tracer is running on, specify cpu_affinity=cpu_num at the end of the 9874b9091e1SSong Chen command. 9884b9091e1SSong Chen 989f96e8577SJoel Fernandes (Google) If unsure, say N 990f96e8577SJoel Fernandes (Google) 9919fe41efaSTom Zanussiconfig SYNTH_EVENT_GEN_TEST 9929fe41efaSTom Zanussi tristate "Test module for in-kernel synthetic event generation" 993726721a5STom Zanussi depends on SYNTH_EVENTS 9949fe41efaSTom Zanussi help 9959fe41efaSTom Zanussi This option creates a test module to check the base 9969fe41efaSTom Zanussi functionality of in-kernel synthetic event definition and 9979fe41efaSTom Zanussi generation. 9989fe41efaSTom Zanussi 9999fe41efaSTom Zanussi To test, insert the module, and then check the trace buffer 10009fe41efaSTom Zanussi for the generated sample events. 10019fe41efaSTom Zanussi 10029fe41efaSTom Zanussi If unsure, say N. 10039fe41efaSTom Zanussi 100464836248STom Zanussiconfig KPROBE_EVENT_GEN_TEST 100564836248STom Zanussi tristate "Test module for in-kernel kprobe event generation" 100664836248STom Zanussi depends on KPROBE_EVENTS 100764836248STom Zanussi help 100864836248STom Zanussi This option creates a test module to check the base 100964836248STom Zanussi functionality of in-kernel kprobe event definition. 101064836248STom Zanussi 101164836248STom Zanussi To test, insert the module, and then check the trace buffer 101264836248STom Zanussi for the generated kprobe events. 101364836248STom Zanussi 101464836248STom Zanussi If unsure, say N. 101564836248STom Zanussi 10162d19bd79STom Zanussiconfig HIST_TRIGGERS_DEBUG 10172d19bd79STom Zanussi bool "Hist trigger debug support" 10182d19bd79STom Zanussi depends on HIST_TRIGGERS 10192d19bd79STom Zanussi help 10202d19bd79STom Zanussi Add "hist_debug" file for each event, which when read will 10212d19bd79STom Zanussi dump out a bunch of internal details about the hist triggers 10222d19bd79STom Zanussi defined on that event. 10232d19bd79STom Zanussi 10242d19bd79STom Zanussi The hist_debug file serves a couple of purposes: 10252d19bd79STom Zanussi 10262d19bd79STom Zanussi - Helps developers verify that nothing is broken. 10272d19bd79STom Zanussi 10282d19bd79STom Zanussi - Provides educational information to support the details 10292d19bd79STom Zanussi of the hist trigger internals as described by 10302d19bd79STom Zanussi Documentation/trace/histogram-design.rst. 10312d19bd79STom Zanussi 10322d19bd79STom Zanussi The hist_debug output only covers the data structures 10332d19bd79STom Zanussi related to the histogram definitions themselves and doesn't 10342d19bd79STom Zanussi display the internals of map buckets or variable values of 10352d19bd79STom Zanussi running histograms. 10362d19bd79STom Zanussi 10372d19bd79STom Zanussi If unsure, say N. 10382d19bd79STom Zanussi 10394ed9f071SSteven Rostedtendif # FTRACE 104040ada30fSIngo Molnar 104140ada30fSIngo Molnarendif # TRACING_SUPPORT 104240ada30fSIngo Molnar 1043