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) 22261778cd7SSteven Rostedt (VMware)config FUNCTION_PROFILER 22361778cd7SSteven Rostedt (VMware) bool "Kernel function profiler" 22461778cd7SSteven Rostedt (VMware) depends on FUNCTION_TRACER 22561778cd7SSteven Rostedt (VMware) default n 22661778cd7SSteven Rostedt (VMware) help 22761778cd7SSteven Rostedt (VMware) This option enables the kernel function profiler. A file is created 22861778cd7SSteven Rostedt (VMware) in debugfs called function_profile_enabled which defaults to zero. 22961778cd7SSteven Rostedt (VMware) When a 1 is echoed into this file profiling begins, and when a 23061778cd7SSteven Rostedt (VMware) zero is entered, profiling stops. A "functions" file is created in 23161778cd7SSteven Rostedt (VMware) the trace_stat directory; this file shows the list of functions that 23261778cd7SSteven Rostedt (VMware) have been hit and their counters. 23361778cd7SSteven Rostedt (VMware) 23461778cd7SSteven Rostedt (VMware) If in doubt, say N. 23561778cd7SSteven Rostedt (VMware) 23661778cd7SSteven Rostedt (VMware)config STACK_TRACER 23761778cd7SSteven Rostedt (VMware) bool "Trace max stack" 23861778cd7SSteven Rostedt (VMware) depends on HAVE_FUNCTION_TRACER 23961778cd7SSteven Rostedt (VMware) select FUNCTION_TRACER 24061778cd7SSteven Rostedt (VMware) select STACKTRACE 24161778cd7SSteven Rostedt (VMware) select KALLSYMS 24261778cd7SSteven Rostedt (VMware) help 24361778cd7SSteven Rostedt (VMware) This special tracer records the maximum stack footprint of the 24461778cd7SSteven Rostedt (VMware) kernel and displays it in /sys/kernel/debug/tracing/stack_trace. 24561778cd7SSteven Rostedt (VMware) 24661778cd7SSteven Rostedt (VMware) This tracer works by hooking into every function call that the 24761778cd7SSteven Rostedt (VMware) kernel executes, and keeping a maximum stack depth value and 24861778cd7SSteven Rostedt (VMware) stack-trace saved. If this is configured with DYNAMIC_FTRACE 24961778cd7SSteven Rostedt (VMware) then it will not have any overhead while the stack tracer 25061778cd7SSteven Rostedt (VMware) is disabled. 25161778cd7SSteven Rostedt (VMware) 25261778cd7SSteven Rostedt (VMware) To enable the stack tracer on bootup, pass in 'stacktrace' 25361778cd7SSteven Rostedt (VMware) on the kernel command line. 25461778cd7SSteven Rostedt (VMware) 25561778cd7SSteven Rostedt (VMware) The stack tracer can also be enabled or disabled via the 25661778cd7SSteven Rostedt (VMware) sysctl kernel.stack_tracer_enabled 25761778cd7SSteven Rostedt (VMware) 25861778cd7SSteven Rostedt (VMware) Say N if unsure. 25961778cd7SSteven Rostedt (VMware) 260c3bc8fd6SJoel Fernandes (Google)config TRACE_PREEMPT_TOGGLE 261c3bc8fd6SJoel Fernandes (Google) bool 262c3bc8fd6SJoel Fernandes (Google) help 263c3bc8fd6SJoel Fernandes (Google) Enables hooks which will be called when preemption is first disabled, 264c3bc8fd6SJoel Fernandes (Google) and last enabled. 265bac429f0SSteven Rostedt 26681d68a96SSteven Rostedtconfig IRQSOFF_TRACER 26781d68a96SSteven Rostedt bool "Interrupts-off Latency Tracer" 26881d68a96SSteven Rostedt default n 26981d68a96SSteven Rostedt depends on TRACE_IRQFLAGS_SUPPORT 27081d68a96SSteven Rostedt select TRACE_IRQFLAGS 2715e0a0939SSteven Rostedt select GENERIC_TRACER 27281d68a96SSteven Rostedt select TRACER_MAX_TRACE 27385bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 27422cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 2750b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 27681d68a96SSteven Rostedt help 27781d68a96SSteven Rostedt This option measures the time spent in irqs-off critical 27881d68a96SSteven Rostedt sections, with microsecond accuracy. 27981d68a96SSteven Rostedt 28081d68a96SSteven Rostedt The default measurement method is a maximum search, which is 28181d68a96SSteven Rostedt disabled by default and can be runtime (re-)started 28281d68a96SSteven Rostedt via: 28381d68a96SSteven Rostedt 284156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 28581d68a96SSteven Rostedt 28640892367SRandy Dunlap (Note that kernel size and overhead increase with this option 2876cd8a4bbSSteven Rostedt enabled. This option and the preempt-off timing option can be 2886cd8a4bbSSteven Rostedt used together or separately.) 2896cd8a4bbSSteven Rostedt 2906cd8a4bbSSteven Rostedtconfig PREEMPT_TRACER 2916cd8a4bbSSteven Rostedt bool "Preemption-off Latency Tracer" 2926cd8a4bbSSteven Rostedt default n 29330c93704SThomas Gleixner depends on PREEMPTION 2945e0a0939SSteven Rostedt select GENERIC_TRACER 2956cd8a4bbSSteven Rostedt select TRACER_MAX_TRACE 29685bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 29722cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 2980b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 299c3bc8fd6SJoel Fernandes (Google) select TRACE_PREEMPT_TOGGLE 3006cd8a4bbSSteven Rostedt help 30140892367SRandy Dunlap This option measures the time spent in preemption-off critical 3026cd8a4bbSSteven Rostedt sections, with microsecond accuracy. 3036cd8a4bbSSteven Rostedt 3046cd8a4bbSSteven Rostedt The default measurement method is a maximum search, which is 3056cd8a4bbSSteven Rostedt disabled by default and can be runtime (re-)started 3066cd8a4bbSSteven Rostedt via: 3076cd8a4bbSSteven Rostedt 308156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 3096cd8a4bbSSteven Rostedt 31040892367SRandy Dunlap (Note that kernel size and overhead increase with this option 3116cd8a4bbSSteven Rostedt enabled. This option and the irqs-off timing option can be 3126cd8a4bbSSteven Rostedt used together or separately.) 3136cd8a4bbSSteven Rostedt 314352ad25aSSteven Rostedtconfig SCHED_TRACER 315352ad25aSSteven Rostedt bool "Scheduling Latency Tracer" 3165e0a0939SSteven Rostedt select GENERIC_TRACER 317352ad25aSSteven Rostedt select CONTEXT_SWITCH_TRACER 318352ad25aSSteven Rostedt select TRACER_MAX_TRACE 31922cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 320352ad25aSSteven Rostedt help 321352ad25aSSteven Rostedt This tracer tracks the latency of the highest priority task 322352ad25aSSteven Rostedt to be scheduled in, starting from the point it has woken up. 323352ad25aSSteven Rostedt 324e7c15cd8SSteven Rostedt (Red Hat)config HWLAT_TRACER 325e7c15cd8SSteven Rostedt (Red Hat) bool "Tracer to detect hardware latencies (like SMIs)" 326e7c15cd8SSteven Rostedt (Red Hat) select GENERIC_TRACER 327e7c15cd8SSteven Rostedt (Red Hat) help 328e7c15cd8SSteven Rostedt (Red Hat) This tracer, when enabled will create one or more kernel threads, 329c5c1ea75SJesper Dangaard Brouer depending on what the cpumask file is set to, which each thread 330e7c15cd8SSteven Rostedt (Red Hat) spinning in a loop looking for interruptions caused by 331e7c15cd8SSteven Rostedt (Red Hat) something other than the kernel. For example, if a 332e7c15cd8SSteven Rostedt (Red Hat) System Management Interrupt (SMI) takes a noticeable amount of 333e7c15cd8SSteven Rostedt (Red Hat) time, this tracer will detect it. This is useful for testing 334e7c15cd8SSteven Rostedt (Red Hat) if a system is reliable for Real Time tasks. 335e7c15cd8SSteven Rostedt (Red Hat) 336e7c15cd8SSteven Rostedt (Red Hat) Some files are created in the tracing directory when this 337e7c15cd8SSteven Rostedt (Red Hat) is enabled: 338e7c15cd8SSteven Rostedt (Red Hat) 339e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/width - time in usecs for how long to spin for 340e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/window - time in usecs between the start of each 341e7c15cd8SSteven Rostedt (Red Hat) iteration 342e7c15cd8SSteven Rostedt (Red Hat) 343e7c15cd8SSteven Rostedt (Red Hat) A kernel thread is created that will spin with interrupts disabled 344c5c1ea75SJesper Dangaard Brouer for "width" microseconds in every "window" cycle. It will not spin 345e7c15cd8SSteven Rostedt (Red Hat) for "window - width" microseconds, where the system can 346e7c15cd8SSteven Rostedt (Red Hat) continue to operate. 347e7c15cd8SSteven Rostedt (Red Hat) 348e7c15cd8SSteven Rostedt (Red Hat) The output will appear in the trace and trace_pipe files. 349e7c15cd8SSteven Rostedt (Red Hat) 350e7c15cd8SSteven Rostedt (Red Hat) When the tracer is not running, it has no affect on the system, 351e7c15cd8SSteven Rostedt (Red Hat) but when it is running, it can cause the system to be 352e7c15cd8SSteven Rostedt (Red Hat) periodically non responsive. Do not run this tracer on a 353e7c15cd8SSteven Rostedt (Red Hat) production system. 354e7c15cd8SSteven Rostedt (Red Hat) 355e7c15cd8SSteven Rostedt (Red Hat) To enable this tracer, echo in "hwlat" into the current_tracer 356e7c15cd8SSteven Rostedt (Red Hat) file. Every time a latency is greater than tracing_thresh, it will 357e7c15cd8SSteven Rostedt (Red Hat) be recorded into the ring buffer. 358e7c15cd8SSteven Rostedt (Red Hat) 359bce29ac9SDaniel Bristot de Oliveiraconfig OSNOISE_TRACER 360bce29ac9SDaniel Bristot de Oliveira bool "OS Noise tracer" 361bce29ac9SDaniel Bristot de Oliveira select GENERIC_TRACER 362bce29ac9SDaniel Bristot de Oliveira help 363bce29ac9SDaniel Bristot de Oliveira In the context of high-performance computing (HPC), the Operating 364bce29ac9SDaniel Bristot de Oliveira System Noise (osnoise) refers to the interference experienced by an 365bce29ac9SDaniel Bristot de Oliveira application due to activities inside the operating system. In the 366bce29ac9SDaniel Bristot de Oliveira context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread 367bce29ac9SDaniel Bristot de Oliveira can cause noise to the system. Moreover, hardware-related jobs can 368bce29ac9SDaniel Bristot de Oliveira also cause noise, for example, via SMIs. 369bce29ac9SDaniel Bristot de Oliveira 370bce29ac9SDaniel Bristot de Oliveira The osnoise tracer leverages the hwlat_detector by running a similar 371bce29ac9SDaniel Bristot de Oliveira loop with preemption, SoftIRQs and IRQs enabled, thus allowing all 372bce29ac9SDaniel Bristot de Oliveira the sources of osnoise during its execution. The osnoise tracer takes 373bce29ac9SDaniel Bristot de Oliveira note of the entry and exit point of any source of interferences, 374bce29ac9SDaniel Bristot de Oliveira increasing a per-cpu interference counter. It saves an interference 375bce29ac9SDaniel Bristot de Oliveira counter for each source of interference. The interference counter for 376bce29ac9SDaniel Bristot de Oliveira NMI, IRQs, SoftIRQs, and threads is increased anytime the tool 377bce29ac9SDaniel Bristot de Oliveira observes these interferences' entry events. When a noise happens 378bce29ac9SDaniel Bristot de Oliveira without any interference from the operating system level, the 379bce29ac9SDaniel Bristot de Oliveira hardware noise counter increases, pointing to a hardware-related 380bce29ac9SDaniel Bristot de Oliveira noise. In this way, osnoise can account for any source of 381bce29ac9SDaniel Bristot de Oliveira interference. At the end of the period, the osnoise tracer prints 382bce29ac9SDaniel Bristot de Oliveira the sum of all noise, the max single noise, the percentage of CPU 383bce29ac9SDaniel Bristot de Oliveira available for the thread, and the counters for the noise sources. 384bce29ac9SDaniel Bristot de Oliveira 385bce29ac9SDaniel Bristot de Oliveira In addition to the tracer, a set of tracepoints were added to 386bce29ac9SDaniel Bristot de Oliveira facilitate the identification of the osnoise source. 387bce29ac9SDaniel Bristot de Oliveira 388bce29ac9SDaniel Bristot de Oliveira The output will appear in the trace and trace_pipe files. 389bce29ac9SDaniel Bristot de Oliveira 390bce29ac9SDaniel Bristot de Oliveira To enable this tracer, echo in "osnoise" into the current_tracer 391bce29ac9SDaniel Bristot de Oliveira file. 392bce29ac9SDaniel Bristot de Oliveira 393*a955d7eaSDaniel Bristot de Oliveiraconfig TIMERLAT_TRACER 394*a955d7eaSDaniel Bristot de Oliveira bool "Timerlat tracer" 395*a955d7eaSDaniel Bristot de Oliveira select OSNOISE_TRACER 396*a955d7eaSDaniel Bristot de Oliveira select GENERIC_TRACER 397*a955d7eaSDaniel Bristot de Oliveira help 398*a955d7eaSDaniel Bristot de Oliveira The timerlat tracer aims to help the preemptive kernel developers 399*a955d7eaSDaniel Bristot de Oliveira to find sources of wakeup latencies of real-time threads. 400*a955d7eaSDaniel Bristot de Oliveira 401*a955d7eaSDaniel Bristot de Oliveira The tracer creates a per-cpu kernel thread with real-time priority. 402*a955d7eaSDaniel Bristot de Oliveira The tracer thread sets a periodic timer to wakeup itself, and goes 403*a955d7eaSDaniel Bristot de Oliveira to sleep waiting for the timer to fire. At the wakeup, the thread 404*a955d7eaSDaniel Bristot de Oliveira then computes a wakeup latency value as the difference between 405*a955d7eaSDaniel Bristot de Oliveira the current time and the absolute time that the timer was set 406*a955d7eaSDaniel Bristot de Oliveira to expire. 407*a955d7eaSDaniel Bristot de Oliveira 408*a955d7eaSDaniel Bristot de Oliveira The tracer prints two lines at every activation. The first is the 409*a955d7eaSDaniel Bristot de Oliveira timer latency observed at the hardirq context before the 410*a955d7eaSDaniel Bristot de Oliveira activation of the thread. The second is the timer latency observed 411*a955d7eaSDaniel Bristot de Oliveira by the thread, which is the same level that cyclictest reports. The 412*a955d7eaSDaniel Bristot de Oliveira ACTIVATION ID field serves to relate the irq execution to its 413*a955d7eaSDaniel Bristot de Oliveira respective thread execution. 414*a955d7eaSDaniel Bristot de Oliveira 415*a955d7eaSDaniel Bristot de Oliveira The tracer is build on top of osnoise tracer, and the osnoise: 416*a955d7eaSDaniel Bristot de Oliveira events can be used to trace the source of interference from NMI, 417*a955d7eaSDaniel Bristot de Oliveira IRQs and other threads. It also enables the capture of the 418*a955d7eaSDaniel Bristot de Oliveira stacktrace at the IRQ context, which helps to identify the code 419*a955d7eaSDaniel Bristot de Oliveira path that can cause thread delay. 420*a955d7eaSDaniel Bristot de Oliveira 42121b3ce30SSteven Rostedt (VMware)config MMIOTRACE 42221b3ce30SSteven Rostedt (VMware) bool "Memory mapped IO tracing" 42321b3ce30SSteven Rostedt (VMware) depends on HAVE_MMIOTRACE_SUPPORT && PCI 42421b3ce30SSteven Rostedt (VMware) select GENERIC_TRACER 42521b3ce30SSteven Rostedt (VMware) help 42621b3ce30SSteven Rostedt (VMware) Mmiotrace traces Memory Mapped I/O access and is meant for 42721b3ce30SSteven Rostedt (VMware) debugging and reverse engineering. It is called from the ioremap 42821b3ce30SSteven Rostedt (VMware) implementation and works via page faults. Tracing is disabled by 42921b3ce30SSteven Rostedt (VMware) default and can be enabled at run-time. 43021b3ce30SSteven Rostedt (VMware) 43121b3ce30SSteven Rostedt (VMware) See Documentation/trace/mmiotrace.rst. 43221b3ce30SSteven Rostedt (VMware) If you are not helping to develop drivers, say N. 43321b3ce30SSteven Rostedt (VMware) 434897f17a6SSteven Rostedtconfig ENABLE_DEFAULT_TRACERS 435897f17a6SSteven Rostedt bool "Trace process context switches and events" 4365e0a0939SSteven Rostedt depends on !GENERIC_TRACER 437b77e38aaSSteven Rostedt select TRACING 438b77e38aaSSteven Rostedt help 43940892367SRandy Dunlap This tracer hooks to various trace points in the kernel, 440b77e38aaSSteven Rostedt allowing the user to pick and choose which trace point they 441897f17a6SSteven Rostedt want to trace. It also includes the sched_switch tracer plugin. 442a7abe97fSSteven Rostedt 443ee08c6ecSFrederic Weisbeckerconfig FTRACE_SYSCALLS 444ee08c6ecSFrederic Weisbecker bool "Trace syscalls" 44566700001SJosh Stone depends on HAVE_SYSCALL_TRACEPOINTS 4465e0a0939SSteven Rostedt select GENERIC_TRACER 4470ea1c415SFrederic Weisbecker select KALLSYMS 448ee08c6ecSFrederic Weisbecker help 449ee08c6ecSFrederic Weisbecker Basic tracer to catch the syscall entry and exit events. 450ee08c6ecSFrederic Weisbecker 451debdd57fSHiraku Toyookaconfig TRACER_SNAPSHOT 452debdd57fSHiraku Toyooka bool "Create a snapshot trace buffer" 453debdd57fSHiraku Toyooka select TRACER_MAX_TRACE 454debdd57fSHiraku Toyooka help 455debdd57fSHiraku Toyooka Allow tracing users to take snapshot of the current buffer using the 456debdd57fSHiraku Toyooka ftrace interface, e.g.: 457debdd57fSHiraku Toyooka 458debdd57fSHiraku Toyooka echo 1 > /sys/kernel/debug/tracing/snapshot 459debdd57fSHiraku Toyooka cat snapshot 460debdd57fSHiraku Toyooka 4610b85ffc2SSteven Rostedt (Red Hat)config TRACER_SNAPSHOT_PER_CPU_SWAP 4620b85ffc2SSteven Rostedt (Red Hat) bool "Allow snapshot to swap per CPU" 4630b85ffc2SSteven Rostedt (Red Hat) depends on TRACER_SNAPSHOT 4640b85ffc2SSteven Rostedt (Red Hat) select RING_BUFFER_ALLOW_SWAP 4650b85ffc2SSteven Rostedt (Red Hat) help 4660b85ffc2SSteven Rostedt (Red Hat) Allow doing a snapshot of a single CPU buffer instead of a 4670b85ffc2SSteven Rostedt (Red Hat) full swap (all buffers). If this is set, then the following is 4680b85ffc2SSteven Rostedt (Red Hat) allowed: 4690b85ffc2SSteven Rostedt (Red Hat) 4700b85ffc2SSteven Rostedt (Red Hat) echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot 4710b85ffc2SSteven Rostedt (Red Hat) 4720b85ffc2SSteven Rostedt (Red Hat) After which, only the tracing buffer for CPU 2 was swapped with 4730b85ffc2SSteven Rostedt (Red Hat) the main tracing buffer, and the other CPU buffers remain the same. 4740b85ffc2SSteven Rostedt (Red Hat) 4750b85ffc2SSteven Rostedt (Red Hat) When this is enabled, this adds a little more overhead to the 4760b85ffc2SSteven Rostedt (Red Hat) trace recording, as it needs to add some checks to synchronize 4770b85ffc2SSteven Rostedt (Red Hat) recording with swaps. But this does not affect the performance 4780b85ffc2SSteven Rostedt (Red Hat) of the overall system. This is enabled by default when the preempt 4790b85ffc2SSteven Rostedt (Red Hat) or irq latency tracers are enabled, as those need to swap as well 4800b85ffc2SSteven Rostedt (Red Hat) and already adds the overhead (plus a lot more). 4810b85ffc2SSteven Rostedt (Red Hat) 4822ed84eebSSteven Rostedtconfig TRACE_BRANCH_PROFILING 4839ae5b879SSteven Rostedt bool 4845e0a0939SSteven Rostedt select GENERIC_TRACER 4859ae5b879SSteven Rostedt 4869ae5b879SSteven Rostedtchoice 4879ae5b879SSteven Rostedt prompt "Branch Profiling" 4889ae5b879SSteven Rostedt default BRANCH_PROFILE_NONE 4899ae5b879SSteven Rostedt help 4909ae5b879SSteven Rostedt The branch profiling is a software profiler. It will add hooks 4919ae5b879SSteven Rostedt into the C conditionals to test which path a branch takes. 4929ae5b879SSteven Rostedt 4939ae5b879SSteven Rostedt The likely/unlikely profiler only looks at the conditions that 4949ae5b879SSteven Rostedt are annotated with a likely or unlikely macro. 4959ae5b879SSteven Rostedt 49640892367SRandy Dunlap The "all branch" profiler will profile every if-statement in the 4979ae5b879SSteven Rostedt kernel. This profiler will also enable the likely/unlikely 49840892367SRandy Dunlap profiler. 4999ae5b879SSteven Rostedt 50040892367SRandy Dunlap Either of the above profilers adds a bit of overhead to the system. 50140892367SRandy Dunlap If unsure, choose "No branch profiling". 5029ae5b879SSteven Rostedt 5039ae5b879SSteven Rostedtconfig BRANCH_PROFILE_NONE 5049ae5b879SSteven Rostedt bool "No branch profiling" 5059ae5b879SSteven Rostedt help 5069ae5b879SSteven Rostedt No branch profiling. Branch profiling adds a bit of overhead. 5079ae5b879SSteven Rostedt Only enable it if you want to analyse the branching behavior. 5089ae5b879SSteven Rostedt Otherwise keep it disabled. 5099ae5b879SSteven Rostedt 5109ae5b879SSteven Rostedtconfig PROFILE_ANNOTATED_BRANCHES 5119ae5b879SSteven Rostedt bool "Trace likely/unlikely profiler" 5129ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5131f0d69a9SSteven Rostedt help 51459bf8964SMasanari Iida This tracer profiles all likely and unlikely macros 5151f0d69a9SSteven Rostedt in the kernel. It will display the results in: 5161f0d69a9SSteven Rostedt 51713e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_annotated 5181f0d69a9SSteven Rostedt 51940892367SRandy Dunlap Note: this will add a significant overhead; only turn this 5201f0d69a9SSteven Rostedt on if you need to profile the system's use of these macros. 5211f0d69a9SSteven Rostedt 5222bcd521aSSteven Rostedtconfig PROFILE_ALL_BRANCHES 52368e76e03SRandy Dunlap bool "Profile all if conditionals" if !FORTIFY_SOURCE 5249ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 5252bcd521aSSteven Rostedt help 5262bcd521aSSteven Rostedt This tracer profiles all branch conditions. Every if () 5272bcd521aSSteven Rostedt taken in the kernel is recorded whether it hit or miss. 5282bcd521aSSteven Rostedt The results will be displayed in: 5292bcd521aSSteven Rostedt 53013e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_all 5312bcd521aSSteven Rostedt 5329ae5b879SSteven Rostedt This option also enables the likely/unlikely profiler. 5339ae5b879SSteven Rostedt 5342bcd521aSSteven Rostedt This configuration, when enabled, will impose a great overhead 5352bcd521aSSteven Rostedt on the system. This should only be enabled when the system 53640892367SRandy Dunlap is to be analyzed in much detail. 5379ae5b879SSteven Rostedtendchoice 5382bcd521aSSteven Rostedt 5392ed84eebSSteven Rostedtconfig TRACING_BRANCHES 54052f232cbSSteven Rostedt bool 54152f232cbSSteven Rostedt help 54252f232cbSSteven Rostedt Selected by tracers that will trace the likely and unlikely 54352f232cbSSteven Rostedt conditions. This prevents the tracers themselves from being 54452f232cbSSteven Rostedt profiled. Profiling the tracing infrastructure can only happen 54552f232cbSSteven Rostedt when the likelys and unlikelys are not being traced. 54652f232cbSSteven Rostedt 5472ed84eebSSteven Rostedtconfig BRANCH_TRACER 54852f232cbSSteven Rostedt bool "Trace likely/unlikely instances" 5492ed84eebSSteven Rostedt depends on TRACE_BRANCH_PROFILING 5502ed84eebSSteven Rostedt select TRACING_BRANCHES 55152f232cbSSteven Rostedt help 55252f232cbSSteven Rostedt This traces the events of likely and unlikely condition 55352f232cbSSteven Rostedt calls in the kernel. The difference between this and the 55452f232cbSSteven Rostedt "Trace likely/unlikely profiler" is that this is not a 55552f232cbSSteven Rostedt histogram of the callers, but actually places the calling 55652f232cbSSteven Rostedt events into a running trace buffer to see when and where the 55752f232cbSSteven Rostedt events happened, as well as their results. 55852f232cbSSteven Rostedt 55952f232cbSSteven Rostedt Say N if unsure. 56052f232cbSSteven Rostedt 5612db270a8SFrederic Weisbeckerconfig BLK_DEV_IO_TRACE 56240892367SRandy Dunlap bool "Support for tracing block IO actions" 5632db270a8SFrederic Weisbecker depends on SYSFS 5641dfba05dSIngo Molnar depends on BLOCK 5652db270a8SFrederic Weisbecker select RELAY 5662db270a8SFrederic Weisbecker select DEBUG_FS 5672db270a8SFrederic Weisbecker select TRACEPOINTS 5685e0a0939SSteven Rostedt select GENERIC_TRACER 5692db270a8SFrederic Weisbecker select STACKTRACE 5702db270a8SFrederic Weisbecker help 5712db270a8SFrederic Weisbecker Say Y here if you want to be able to trace the block layer actions 5722db270a8SFrederic Weisbecker on a given queue. Tracing allows you to see any traffic happening 5732db270a8SFrederic Weisbecker on a block device queue. For more information (and the userspace 5742db270a8SFrederic Weisbecker support tools needed), fetch the blktrace tools from: 5752db270a8SFrederic Weisbecker 5762db270a8SFrederic Weisbecker git://git.kernel.dk/blktrace.git 5772db270a8SFrederic Weisbecker 5782db270a8SFrederic Weisbecker Tracing also is possible using the ftrace interface, e.g.: 5792db270a8SFrederic Weisbecker 5802db270a8SFrederic Weisbecker echo 1 > /sys/block/sda/sda1/trace/enable 5812db270a8SFrederic Weisbecker echo blk > /sys/kernel/debug/tracing/current_tracer 5822db270a8SFrederic Weisbecker cat /sys/kernel/debug/tracing/trace_pipe 5832db270a8SFrederic Weisbecker 5842db270a8SFrederic Weisbecker If unsure, say N. 58536994e58SFrederic Weisbecker 5866b0b7551SAnton Blanchardconfig KPROBE_EVENTS 587413d37d1SMasami Hiramatsu depends on KPROBES 588f850c30cSHeiko Carstens depends on HAVE_REGS_AND_STACK_ACCESS_API 58977b44d1bSMasami Hiramatsu bool "Enable kprobes-based dynamic events" 590413d37d1SMasami Hiramatsu select TRACING 5918ab83f56SSrikar Dronamraju select PROBE_EVENTS 5926212dd29SMasami Hiramatsu select DYNAMIC_EVENTS 59377b44d1bSMasami Hiramatsu default y 594413d37d1SMasami Hiramatsu help 59540892367SRandy Dunlap This allows the user to add tracing events (similar to tracepoints) 59640892367SRandy Dunlap on the fly via the ftrace interface. See 5975fb94e9cSMauro Carvalho Chehab Documentation/trace/kprobetrace.rst for more details. 59877b44d1bSMasami Hiramatsu 59977b44d1bSMasami Hiramatsu Those events can be inserted wherever kprobes can probe, and record 60077b44d1bSMasami Hiramatsu various register and memory values. 60177b44d1bSMasami Hiramatsu 60240892367SRandy Dunlap This option is also required by perf-probe subcommand of perf tools. 60340892367SRandy Dunlap If you want to use perf tools, this option is strongly recommended. 604413d37d1SMasami Hiramatsu 60545408c4fSMasami Hiramatsuconfig KPROBE_EVENTS_ON_NOTRACE 60645408c4fSMasami Hiramatsu bool "Do NOT protect notrace function from kprobe events" 60745408c4fSMasami Hiramatsu depends on KPROBE_EVENTS 6087bb83f6fSMasami Hiramatsu depends on DYNAMIC_FTRACE 60945408c4fSMasami Hiramatsu default n 61045408c4fSMasami Hiramatsu help 61145408c4fSMasami Hiramatsu This is only for the developers who want to debug ftrace itself 61245408c4fSMasami Hiramatsu using kprobe events. 61345408c4fSMasami Hiramatsu 61445408c4fSMasami Hiramatsu If kprobes can use ftrace instead of breakpoint, ftrace related 61528cc65a1SColin Ian King functions are protected from kprobe-events to prevent an infinite 61645408c4fSMasami Hiramatsu recursion or any unexpected execution path which leads to a kernel 61745408c4fSMasami Hiramatsu crash. 61845408c4fSMasami Hiramatsu 61945408c4fSMasami Hiramatsu This option disables such protection and allows you to put kprobe 62045408c4fSMasami Hiramatsu events on ftrace functions for debugging ftrace by itself. 62145408c4fSMasami Hiramatsu Note that this might let you shoot yourself in the foot. 62245408c4fSMasami Hiramatsu 62345408c4fSMasami Hiramatsu If unsure, say N. 62445408c4fSMasami Hiramatsu 6256b0b7551SAnton Blanchardconfig UPROBE_EVENTS 626f3f096cfSSrikar Dronamraju bool "Enable uprobes-based dynamic events" 627f3f096cfSSrikar Dronamraju depends on ARCH_SUPPORTS_UPROBES 628f3f096cfSSrikar Dronamraju depends on MMU 62909294e31SDavid A. Long depends on PERF_EVENTS 630f3f096cfSSrikar Dronamraju select UPROBES 631f3f096cfSSrikar Dronamraju select PROBE_EVENTS 6320597c49cSMasami Hiramatsu select DYNAMIC_EVENTS 633f3f096cfSSrikar Dronamraju select TRACING 63461f35d75SArnaldo Carvalho de Melo default y 635f3f096cfSSrikar Dronamraju help 636f3f096cfSSrikar Dronamraju This allows the user to add tracing events on top of userspace 637f3f096cfSSrikar Dronamraju dynamic events (similar to tracepoints) on the fly via the trace 638f3f096cfSSrikar Dronamraju events interface. Those events can be inserted wherever uprobes 639f3f096cfSSrikar Dronamraju can probe, and record various registers. 640f3f096cfSSrikar Dronamraju This option is required if you plan to use perf-probe subcommand 641f3f096cfSSrikar Dronamraju of perf tools on user space applications. 642f3f096cfSSrikar Dronamraju 643e1abf2ccSIngo Molnarconfig BPF_EVENTS 644e1abf2ccSIngo Molnar depends on BPF_SYSCALL 6456b0b7551SAnton Blanchard depends on (KPROBE_EVENTS || UPROBE_EVENTS) && PERF_EVENTS 646e1abf2ccSIngo Molnar bool 647e1abf2ccSIngo Molnar default y 648e1abf2ccSIngo Molnar help 6495cbd22c1SPeter Wu This allows the user to attach BPF programs to kprobe, uprobe, and 6505cbd22c1SPeter Wu tracepoint events. 651e1abf2ccSIngo Molnar 6525448d44cSMasami Hiramatsuconfig DYNAMIC_EVENTS 6535448d44cSMasami Hiramatsu def_bool n 6545448d44cSMasami Hiramatsu 6558ab83f56SSrikar Dronamrajuconfig PROBE_EVENTS 6568ab83f56SSrikar Dronamraju def_bool n 6578ab83f56SSrikar Dronamraju 6589802d865SJosef Bacikconfig BPF_KPROBE_OVERRIDE 6599802d865SJosef Bacik bool "Enable BPF programs to override a kprobed function" 6609802d865SJosef Bacik depends on BPF_EVENTS 661540adea3SMasami Hiramatsu depends on FUNCTION_ERROR_INJECTION 6629802d865SJosef Bacik default n 6639802d865SJosef Bacik help 6649802d865SJosef Bacik Allows BPF to override the execution of a probed function and 6659802d865SJosef Bacik set a different return value. This is used for error injection. 6669802d865SJosef Bacik 6678da3821bSSteven Rostedtconfig FTRACE_MCOUNT_RECORD 6688da3821bSSteven Rostedt def_bool y 6698da3821bSSteven Rostedt depends on DYNAMIC_FTRACE 6708da3821bSSteven Rostedt depends on HAVE_FTRACE_MCOUNT_RECORD 6718da3821bSSteven Rostedt 6723b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6733b15cdc1SSami Tolvanen bool 6743b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6753b15cdc1SSami Tolvanen 6763b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_CC 6773b15cdc1SSami Tolvanen def_bool y 6783b15cdc1SSami Tolvanen depends on $(cc-option,-mrecord-mcount) 6793b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6803b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6813b15cdc1SSami Tolvanen 68222c8542dSSami Tolvanenconfig FTRACE_MCOUNT_USE_OBJTOOL 68322c8542dSSami Tolvanen def_bool y 68422c8542dSSami Tolvanen depends on HAVE_OBJTOOL_MCOUNT 68522c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 68622c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 68722c8542dSSami Tolvanen depends on FTRACE_MCOUNT_RECORD 68822c8542dSSami Tolvanen 6893b15cdc1SSami Tolvanenconfig FTRACE_MCOUNT_USE_RECORDMCOUNT 6903b15cdc1SSami Tolvanen def_bool y 6913b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY 6923b15cdc1SSami Tolvanen depends on !FTRACE_MCOUNT_USE_CC 69322c8542dSSami Tolvanen depends on !FTRACE_MCOUNT_USE_OBJTOOL 6943b15cdc1SSami Tolvanen depends on FTRACE_MCOUNT_RECORD 6953b15cdc1SSami Tolvanen 69608d43a5fSTom Zanussiconfig TRACING_MAP 69708d43a5fSTom Zanussi bool 69808d43a5fSTom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 69908d43a5fSTom Zanussi help 70008d43a5fSTom Zanussi tracing_map is a special-purpose lock-free map for tracing, 70108d43a5fSTom Zanussi separated out as a stand-alone facility in order to allow it 70208d43a5fSTom Zanussi to be shared between multiple tracers. It isn't meant to be 70308d43a5fSTom Zanussi generally used outside of that context, and is normally 70408d43a5fSTom Zanussi selected by tracers that use it. 70508d43a5fSTom Zanussi 706726721a5STom Zanussiconfig SYNTH_EVENTS 707726721a5STom Zanussi bool "Synthetic trace events" 708726721a5STom Zanussi select TRACING 709726721a5STom Zanussi select DYNAMIC_EVENTS 710726721a5STom Zanussi default n 711726721a5STom Zanussi help 712726721a5STom Zanussi Synthetic events are user-defined trace events that can be 713726721a5STom Zanussi used to combine data from other trace events or in fact any 714726721a5STom Zanussi data source. Synthetic events can be generated indirectly 715726721a5STom Zanussi via the trace() action of histogram triggers or directly 716726721a5STom Zanussi by way of an in-kernel API. 717726721a5STom Zanussi 718726721a5STom Zanussi See Documentation/trace/events.rst or 719726721a5STom Zanussi Documentation/trace/histogram.rst for details and examples. 720726721a5STom Zanussi 721726721a5STom Zanussi If in doubt, say N. 722726721a5STom Zanussi 7237ef224d1STom Zanussiconfig HIST_TRIGGERS 7247ef224d1STom Zanussi bool "Histogram triggers" 7257ef224d1STom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 7267ef224d1STom Zanussi select TRACING_MAP 7277ad8fb61STom Zanussi select TRACING 7287bbab38dSMasami Hiramatsu select DYNAMIC_EVENTS 729726721a5STom Zanussi select SYNTH_EVENTS 7307ef224d1STom Zanussi default n 7317ef224d1STom Zanussi help 7327ef224d1STom Zanussi Hist triggers allow one or more arbitrary trace event fields 7337ef224d1STom Zanussi to be aggregated into hash tables and dumped to stdout by 7347ef224d1STom Zanussi reading a debugfs/tracefs file. They're useful for 7357ef224d1STom Zanussi gathering quick and dirty (though precise) summaries of 7367ef224d1STom Zanussi event activity as an initial guide for further investigation 7377ef224d1STom Zanussi using more advanced tools. 7387ef224d1STom Zanussi 73989e270c1STom Zanussi Inter-event tracing of quantities such as latencies is also 74089e270c1STom Zanussi supported using hist triggers under this option. 74189e270c1STom Zanussi 742ea272257SMauro Carvalho Chehab See Documentation/trace/histogram.rst. 7437ef224d1STom Zanussi If in doubt, say N. 7447ef224d1STom Zanussi 7456c3edaf9SCong Wangconfig TRACE_EVENT_INJECT 7466c3edaf9SCong Wang bool "Trace event injection" 7476c3edaf9SCong Wang depends on TRACING 7486c3edaf9SCong Wang help 7496c3edaf9SCong Wang Allow user-space to inject a specific trace event into the ring 7506c3edaf9SCong Wang buffer. This is mainly used for testing purpose. 7516c3edaf9SCong Wang 7526c3edaf9SCong Wang If unsure, say N. 7536c3edaf9SCong Wang 75481dc9f0eSSteven Rostedt (Red Hat)config TRACEPOINT_BENCHMARK 75581dc9f0eSSteven Rostedt (Red Hat) bool "Add tracepoint that benchmarks tracepoints" 75681dc9f0eSSteven Rostedt (Red Hat) help 75781dc9f0eSSteven Rostedt (Red Hat) This option creates the tracepoint "benchmark:benchmark_event". 75881dc9f0eSSteven Rostedt (Red Hat) When the tracepoint is enabled, it kicks off a kernel thread that 75969268094SRolf Eike Beer goes into an infinite loop (calling cond_resched() to let other tasks 76081dc9f0eSSteven Rostedt (Red Hat) run), and calls the tracepoint. Each iteration will record the time 76181dc9f0eSSteven Rostedt (Red Hat) it took to write to the tracepoint and the next iteration that 76281dc9f0eSSteven Rostedt (Red Hat) data will be passed to the tracepoint itself. That is, the tracepoint 76381dc9f0eSSteven Rostedt (Red Hat) will report the time it took to do the previous tracepoint. 76481dc9f0eSSteven Rostedt (Red Hat) The string written to the tracepoint is a static string of 128 bytes 76581dc9f0eSSteven Rostedt (Red Hat) to keep the time the same. The initial string is simply a write of 76681dc9f0eSSteven Rostedt (Red Hat) "START". The second string records the cold cache time of the first 76781dc9f0eSSteven Rostedt (Red Hat) write which is not added to the rest of the calculations. 76881dc9f0eSSteven Rostedt (Red Hat) 76981dc9f0eSSteven Rostedt (Red Hat) As it is a tight loop, it benchmarks as hot cache. That's fine because 77081dc9f0eSSteven Rostedt (Red Hat) we care most about hot paths that are probably in cache already. 77181dc9f0eSSteven Rostedt (Red Hat) 77281dc9f0eSSteven Rostedt (Red Hat) An example of the output: 77381dc9f0eSSteven Rostedt (Red Hat) 77481dc9f0eSSteven Rostedt (Red Hat) START 77581dc9f0eSSteven Rostedt (Red Hat) first=3672 [COLD CACHED] 77681dc9f0eSSteven Rostedt (Red Hat) last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712 77781dc9f0eSSteven Rostedt (Red Hat) last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337 77881dc9f0eSSteven Rostedt (Red Hat) last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064 77981dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411 78081dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389 78181dc9f0eSSteven Rostedt (Red Hat) last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666 78281dc9f0eSSteven Rostedt (Red Hat) 78381dc9f0eSSteven Rostedt (Red Hat) 7845092dbc9SSteven Rostedtconfig RING_BUFFER_BENCHMARK 7855092dbc9SSteven Rostedt tristate "Ring buffer benchmark stress tester" 7865092dbc9SSteven Rostedt depends on RING_BUFFER 7875092dbc9SSteven Rostedt help 7885092dbc9SSteven Rostedt This option creates a test to stress the ring buffer and benchmark it. 78940892367SRandy Dunlap It creates its own ring buffer such that it will not interfere with 7905092dbc9SSteven Rostedt any other users of the ring buffer (such as ftrace). It then creates 7915092dbc9SSteven Rostedt a producer and consumer that will run for 10 seconds and sleep for 7925092dbc9SSteven Rostedt 10 seconds. Each interval it will print out the number of events 7935092dbc9SSteven Rostedt it recorded and give a rough estimate of how long each iteration took. 7945092dbc9SSteven Rostedt 7955092dbc9SSteven Rostedt It does not disable interrupts or raise its priority, so it may be 7965092dbc9SSteven Rostedt affected by processes that are running. 7975092dbc9SSteven Rostedt 79840892367SRandy Dunlap If unsure, say N. 7995092dbc9SSteven Rostedt 8001e837945SSteven Rostedt (VMware)config TRACE_EVAL_MAP_FILE 8011e837945SSteven Rostedt (VMware) bool "Show eval mappings for trace events" 8021e837945SSteven Rostedt (VMware) depends on TRACING 8031e837945SSteven Rostedt (VMware) help 8041e837945SSteven Rostedt (VMware) The "print fmt" of the trace events will show the enum/sizeof names 8051e837945SSteven Rostedt (VMware) instead of their values. This can cause problems for user space tools 8061e837945SSteven Rostedt (VMware) that use this string to parse the raw data as user space does not know 8071e837945SSteven Rostedt (VMware) how to convert the string to its value. 8081e837945SSteven Rostedt (VMware) 8091e837945SSteven Rostedt (VMware) To fix this, there's a special macro in the kernel that can be used 8101e837945SSteven Rostedt (VMware) to convert an enum/sizeof into its value. If this macro is used, then 8111e837945SSteven Rostedt (VMware) the print fmt strings will be converted to their values. 8121e837945SSteven Rostedt (VMware) 8131e837945SSteven Rostedt (VMware) If something does not get converted properly, this option can be 8141e837945SSteven Rostedt (VMware) used to show what enums/sizeof the kernel tried to convert. 8151e837945SSteven Rostedt (VMware) 8161e837945SSteven Rostedt (VMware) This option is for debugging the conversions. A file is created 8171e837945SSteven Rostedt (VMware) in the tracing directory called "eval_map" that will show the 8181e837945SSteven Rostedt (VMware) names matched with their values and what trace event system they 8191e837945SSteven Rostedt (VMware) belong too. 8201e837945SSteven Rostedt (VMware) 8211e837945SSteven Rostedt (VMware) Normally, the mapping of the strings to values will be freed after 8221e837945SSteven Rostedt (VMware) boot up or module load. With this option, they will not be freed, as 8231e837945SSteven Rostedt (VMware) they are needed for the "eval_map" file. Enabling this option will 8241e837945SSteven Rostedt (VMware) increase the memory footprint of the running kernel. 8251e837945SSteven Rostedt (VMware) 8261e837945SSteven Rostedt (VMware) If unsure, say N. 8271e837945SSteven Rostedt (VMware) 828773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION 829773c1670SSteven Rostedt (VMware) bool "Record functions that recurse in function tracing" 830773c1670SSteven Rostedt (VMware) depends on FUNCTION_TRACER 831773c1670SSteven Rostedt (VMware) help 832773c1670SSteven Rostedt (VMware) All callbacks that attach to the function tracing have some sort 833773c1670SSteven Rostedt (VMware) of protection against recursion. Even though the protection exists, 834773c1670SSteven Rostedt (VMware) it adds overhead. This option will create a file in the tracefs 835773c1670SSteven Rostedt (VMware) file system called "recursed_functions" that will list the functions 836773c1670SSteven Rostedt (VMware) that triggered a recursion. 837773c1670SSteven Rostedt (VMware) 838773c1670SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 839773c1670SSteven Rostedt (VMware) 840773c1670SSteven Rostedt (VMware) If unsure, say N 841773c1670SSteven Rostedt (VMware) 842773c1670SSteven Rostedt (VMware)config FTRACE_RECORD_RECURSION_SIZE 843773c1670SSteven Rostedt (VMware) int "Max number of recursed functions to record" 844773c1670SSteven Rostedt (VMware) default 128 845773c1670SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 846773c1670SSteven Rostedt (VMware) help 847773c1670SSteven Rostedt (VMware) This defines the limit of number of functions that can be 848773c1670SSteven Rostedt (VMware) listed in the "recursed_functions" file, that lists all 849773c1670SSteven Rostedt (VMware) the functions that caused a recursion to happen. 850773c1670SSteven Rostedt (VMware) This file can be reset, but the limit can not change in 851773c1670SSteven Rostedt (VMware) size at runtime. 852773c1670SSteven Rostedt (VMware) 85328575c61SSteven Rostedt (VMware)config RING_BUFFER_RECORD_RECURSION 85428575c61SSteven Rostedt (VMware) bool "Record functions that recurse in the ring buffer" 85528575c61SSteven Rostedt (VMware) depends on FTRACE_RECORD_RECURSION 85628575c61SSteven Rostedt (VMware) # default y, because it is coupled with FTRACE_RECORD_RECURSION 85728575c61SSteven Rostedt (VMware) default y 85828575c61SSteven Rostedt (VMware) help 85928575c61SSteven Rostedt (VMware) The ring buffer has its own internal recursion. Although when 86028575c61SSteven Rostedt (VMware) recursion happens it wont cause harm because of the protection, 86128575c61SSteven Rostedt (VMware) but it does cause an unwanted overhead. Enabling this option will 86228575c61SSteven Rostedt (VMware) place where recursion was detected into the ftrace "recursed_functions" 86328575c61SSteven Rostedt (VMware) file. 86428575c61SSteven Rostedt (VMware) 86528575c61SSteven Rostedt (VMware) This will add more overhead to cases that have recursion. 86628575c61SSteven Rostedt (VMware) 8671e837945SSteven Rostedt (VMware)config GCOV_PROFILE_FTRACE 8681e837945SSteven Rostedt (VMware) bool "Enable GCOV profiling on ftrace subsystem" 8691e837945SSteven Rostedt (VMware) depends on GCOV_KERNEL 8701e837945SSteven Rostedt (VMware) help 8711e837945SSteven Rostedt (VMware) Enable GCOV profiling on ftrace subsystem for checking 8721e837945SSteven Rostedt (VMware) which functions/lines are tested. 8731e837945SSteven Rostedt (VMware) 8741e837945SSteven Rostedt (VMware) If unsure, say N. 8751e837945SSteven Rostedt (VMware) 8761e837945SSteven Rostedt (VMware) Note that on a kernel compiled with this config, ftrace will 8771e837945SSteven Rostedt (VMware) run significantly slower. 8781e837945SSteven Rostedt (VMware) 8791e837945SSteven Rostedt (VMware)config FTRACE_SELFTEST 8801e837945SSteven Rostedt (VMware) bool 8811e837945SSteven Rostedt (VMware) 8821e837945SSteven Rostedt (VMware)config FTRACE_STARTUP_TEST 8831e837945SSteven Rostedt (VMware) bool "Perform a startup test on ftrace" 8841e837945SSteven Rostedt (VMware) depends on GENERIC_TRACER 8851e837945SSteven Rostedt (VMware) select FTRACE_SELFTEST 8861e837945SSteven Rostedt (VMware) help 8871e837945SSteven Rostedt (VMware) This option performs a series of startup tests on ftrace. On bootup 8881e837945SSteven Rostedt (VMware) a series of tests are made to verify that the tracer is 8891e837945SSteven Rostedt (VMware) functioning properly. It will do tests on all the configured 8901e837945SSteven Rostedt (VMware) tracers of ftrace. 8911e837945SSteven Rostedt (VMware) 8921e837945SSteven Rostedt (VMware)config EVENT_TRACE_STARTUP_TEST 8931e837945SSteven Rostedt (VMware) bool "Run selftest on trace events" 8941e837945SSteven Rostedt (VMware) depends on FTRACE_STARTUP_TEST 8951e837945SSteven Rostedt (VMware) default y 8961e837945SSteven Rostedt (VMware) help 8971e837945SSteven Rostedt (VMware) This option performs a test on all trace events in the system. 8981e837945SSteven Rostedt (VMware) It basically just enables each event and runs some code that 8991e837945SSteven Rostedt (VMware) will trigger events (not necessarily the event it enables) 9001e837945SSteven Rostedt (VMware) This may take some time run as there are a lot of events. 9011e837945SSteven Rostedt (VMware) 9021e837945SSteven Rostedt (VMware)config EVENT_TRACE_TEST_SYSCALLS 9031e837945SSteven Rostedt (VMware) bool "Run selftest on syscall events" 9041e837945SSteven Rostedt (VMware) depends on EVENT_TRACE_STARTUP_TEST 9051e837945SSteven Rostedt (VMware) help 9061e837945SSteven Rostedt (VMware) This option will also enable testing every syscall event. 9071e837945SSteven Rostedt (VMware) It only enables the event and disables it and runs various loads 9081e837945SSteven Rostedt (VMware) with the event enabled. This adds a bit more time for kernel boot 9091e837945SSteven Rostedt (VMware) up since it runs this on every system call defined. 9101e837945SSteven Rostedt (VMware) 9111e837945SSteven Rostedt (VMware) TBD - enable a way to actually call the syscalls as we test their 9121e837945SSteven Rostedt (VMware) events 9131e837945SSteven Rostedt (VMware) 9146c43e554SSteven Rostedt (Red Hat)config RING_BUFFER_STARTUP_TEST 9156c43e554SSteven Rostedt (Red Hat) bool "Ring buffer startup self test" 9166c43e554SSteven Rostedt (Red Hat) depends on RING_BUFFER 9176c43e554SSteven Rostedt (Red Hat) help 9186c43e554SSteven Rostedt (Red Hat) Run a simple self test on the ring buffer on boot up. Late in the 9196c43e554SSteven Rostedt (Red Hat) kernel boot sequence, the test will start that kicks off 9206c43e554SSteven Rostedt (Red Hat) a thread per cpu. Each thread will write various size events 9216c43e554SSteven Rostedt (Red Hat) into the ring buffer. Another thread is created to send IPIs 9226c43e554SSteven Rostedt (Red Hat) to each of the threads, where the IPI handler will also write 9236c43e554SSteven Rostedt (Red Hat) to the ring buffer, to test/stress the nesting ability. 9246c43e554SSteven Rostedt (Red Hat) If any anomalies are discovered, a warning will be displayed 9256c43e554SSteven Rostedt (Red Hat) and all ring buffers will be disabled. 9266c43e554SSteven Rostedt (Red Hat) 9276c43e554SSteven Rostedt (Red Hat) The test runs for 10 seconds. This will slow your boot time 9286c43e554SSteven Rostedt (Red Hat) by at least 10 more seconds. 9296c43e554SSteven Rostedt (Red Hat) 9306c43e554SSteven Rostedt (Red Hat) At the end of the test, statics and more checks are done. 9316c43e554SSteven Rostedt (Red Hat) It will output the stats of each per cpu buffer. What 9326c43e554SSteven Rostedt (Red Hat) was written, the sizes, what was read, what was lost, and 9336c43e554SSteven Rostedt (Red Hat) other similar details. 9346c43e554SSteven Rostedt (Red Hat) 9356c43e554SSteven Rostedt (Red Hat) If unsure, say N 9366c43e554SSteven Rostedt (Red Hat) 9375b7be9c7SSteven Rostedt (VMware)config RING_BUFFER_VALIDATE_TIME_DELTAS 9385b7be9c7SSteven Rostedt (VMware) bool "Verify ring buffer time stamp deltas" 9395b7be9c7SSteven Rostedt (VMware) depends on RING_BUFFER 9405b7be9c7SSteven Rostedt (VMware) help 9415b7be9c7SSteven Rostedt (VMware) This will audit the time stamps on the ring buffer sub 9425b7be9c7SSteven Rostedt (VMware) buffer to make sure that all the time deltas for the 9435b7be9c7SSteven Rostedt (VMware) events on a sub buffer matches the current time stamp. 9445b7be9c7SSteven Rostedt (VMware) This audit is performed for every event that is not 9455b7be9c7SSteven Rostedt (VMware) interrupted, or interrupting another event. A check 9465b7be9c7SSteven Rostedt (VMware) is also made when traversing sub buffers to make sure 9475b7be9c7SSteven Rostedt (VMware) that all the deltas on the previous sub buffer do not 9485b7be9c7SSteven Rostedt (VMware) add up to be greater than the current time stamp. 9495b7be9c7SSteven Rostedt (VMware) 9505b7be9c7SSteven Rostedt (VMware) NOTE: This adds significant overhead to recording of events, 9515b7be9c7SSteven Rostedt (VMware) and should only be used to test the logic of the ring buffer. 9525b7be9c7SSteven Rostedt (VMware) Do not use it on production systems. 9535b7be9c7SSteven Rostedt (VMware) 9545b7be9c7SSteven Rostedt (VMware) Only say Y if you understand what this does, and you 9555b7be9c7SSteven Rostedt (VMware) still want it enabled. Otherwise say N 9565b7be9c7SSteven Rostedt (VMware) 957a48fc4f5SSteven Rostedt (VMware)config MMIOTRACE_TEST 958a48fc4f5SSteven Rostedt (VMware) tristate "Test module for mmiotrace" 959a48fc4f5SSteven Rostedt (VMware) depends on MMIOTRACE && m 960a48fc4f5SSteven Rostedt (VMware) help 961a48fc4f5SSteven Rostedt (VMware) This is a dumb module for testing mmiotrace. It is very dangerous 962a48fc4f5SSteven Rostedt (VMware) as it will write garbage to IO memory starting at a given address. 963a48fc4f5SSteven Rostedt (VMware) However, it should be safe to use on e.g. unused portion of VRAM. 964a48fc4f5SSteven Rostedt (VMware) 965a48fc4f5SSteven Rostedt (VMware) Say N, unless you absolutely know what you are doing. 966a48fc4f5SSteven Rostedt (VMware) 967f96e8577SJoel Fernandes (Google)config PREEMPTIRQ_DELAY_TEST 968a48fc4f5SSteven Rostedt (VMware) tristate "Test module to create a preempt / IRQ disable delay thread to test latency tracers" 969f96e8577SJoel Fernandes (Google) depends on m 970f96e8577SJoel Fernandes (Google) help 971f96e8577SJoel Fernandes (Google) Select this option to build a test module that can help test latency 972f96e8577SJoel Fernandes (Google) tracers by executing a preempt or irq disable section with a user 973f96e8577SJoel Fernandes (Google) configurable delay. The module busy waits for the duration of the 974f96e8577SJoel Fernandes (Google) critical section. 975f96e8577SJoel Fernandes (Google) 97679393723SViktor Rosendahl (BMW) For example, the following invocation generates a burst of three 97779393723SViktor Rosendahl (BMW) irq-disabled critical sections for 500us: 97879393723SViktor Rosendahl (BMW) modprobe preemptirq_delay_test test_mode=irq delay=500 burst_size=3 979f96e8577SJoel Fernandes (Google) 9804b9091e1SSong Chen What's more, if you want to attach the test on the cpu which the latency 9814b9091e1SSong Chen tracer is running on, specify cpu_affinity=cpu_num at the end of the 9824b9091e1SSong Chen command. 9834b9091e1SSong Chen 984f96e8577SJoel Fernandes (Google) If unsure, say N 985f96e8577SJoel Fernandes (Google) 9869fe41efaSTom Zanussiconfig SYNTH_EVENT_GEN_TEST 9879fe41efaSTom Zanussi tristate "Test module for in-kernel synthetic event generation" 988726721a5STom Zanussi depends on SYNTH_EVENTS 9899fe41efaSTom Zanussi help 9909fe41efaSTom Zanussi This option creates a test module to check the base 9919fe41efaSTom Zanussi functionality of in-kernel synthetic event definition and 9929fe41efaSTom Zanussi generation. 9939fe41efaSTom Zanussi 9949fe41efaSTom Zanussi To test, insert the module, and then check the trace buffer 9959fe41efaSTom Zanussi for the generated sample events. 9969fe41efaSTom Zanussi 9979fe41efaSTom Zanussi If unsure, say N. 9989fe41efaSTom Zanussi 99964836248STom Zanussiconfig KPROBE_EVENT_GEN_TEST 100064836248STom Zanussi tristate "Test module for in-kernel kprobe event generation" 100164836248STom Zanussi depends on KPROBE_EVENTS 100264836248STom Zanussi help 100364836248STom Zanussi This option creates a test module to check the base 100464836248STom Zanussi functionality of in-kernel kprobe event definition. 100564836248STom Zanussi 100664836248STom Zanussi To test, insert the module, and then check the trace buffer 100764836248STom Zanussi for the generated kprobe events. 100864836248STom Zanussi 100964836248STom Zanussi If unsure, say N. 101064836248STom Zanussi 10112d19bd79STom Zanussiconfig HIST_TRIGGERS_DEBUG 10122d19bd79STom Zanussi bool "Hist trigger debug support" 10132d19bd79STom Zanussi depends on HIST_TRIGGERS 10142d19bd79STom Zanussi help 10152d19bd79STom Zanussi Add "hist_debug" file for each event, which when read will 10162d19bd79STom Zanussi dump out a bunch of internal details about the hist triggers 10172d19bd79STom Zanussi defined on that event. 10182d19bd79STom Zanussi 10192d19bd79STom Zanussi The hist_debug file serves a couple of purposes: 10202d19bd79STom Zanussi 10212d19bd79STom Zanussi - Helps developers verify that nothing is broken. 10222d19bd79STom Zanussi 10232d19bd79STom Zanussi - Provides educational information to support the details 10242d19bd79STom Zanussi of the hist trigger internals as described by 10252d19bd79STom Zanussi Documentation/trace/histogram-design.rst. 10262d19bd79STom Zanussi 10272d19bd79STom Zanussi The hist_debug output only covers the data structures 10282d19bd79STom Zanussi related to the histogram definitions themselves and doesn't 10292d19bd79STom Zanussi display the internals of map buckets or variable values of 10302d19bd79STom Zanussi running histograms. 10312d19bd79STom Zanussi 10322d19bd79STom Zanussi If unsure, say N. 10332d19bd79STom Zanussi 10344ed9f071SSteven Rostedtendif # FTRACE 103540ada30fSIngo Molnar 103640ada30fSIngo Molnarendif # TRACING_SUPPORT 103740ada30fSIngo Molnar 1038