116444a8aSArnaldo Carvalho de Melo# 2606576ceSSteven Rostedt# Architectures that offer an FUNCTION_TRACER implementation should 3606576ceSSteven Rostedt# select HAVE_FUNCTION_TRACER: 416444a8aSArnaldo Carvalho de Melo# 52a3a4f66SFrédéric Weisbecker 68d26487fSTörök Edwinconfig USER_STACKTRACE_SUPPORT 78d26487fSTörök Edwin bool 88d26487fSTörök Edwin 92a3a4f66SFrédéric Weisbeckerconfig NOP_TRACER 102a3a4f66SFrédéric Weisbecker bool 112a3a4f66SFrédéric Weisbecker 1278d904b4SSteven Rostedtconfig HAVE_FTRACE_NMI_ENTER 1378d904b4SSteven Rostedt bool 14555f386cSMike Frysinger help 155fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 1678d904b4SSteven Rostedt 17606576ceSSteven Rostedtconfig HAVE_FUNCTION_TRACER 1816444a8aSArnaldo Carvalho de Melo bool 19555f386cSMike Frysinger help 205fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 21bc0c38d1SSteven Rostedt 22fb52607aSFrederic Weisbeckerconfig HAVE_FUNCTION_GRAPH_TRACER 2315e6cb36SFrederic Weisbecker bool 24555f386cSMike Frysinger help 255fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 2615e6cb36SFrederic Weisbecker 27677aa9f7SSteven Rostedtconfig HAVE_DYNAMIC_FTRACE 28677aa9f7SSteven Rostedt bool 29555f386cSMike Frysinger help 305fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 31677aa9f7SSteven Rostedt 3206aeaaeaSMasami Hiramatsuconfig HAVE_DYNAMIC_FTRACE_WITH_REGS 3306aeaaeaSMasami Hiramatsu bool 3406aeaaeaSMasami Hiramatsu 358da3821bSSteven Rostedtconfig HAVE_FTRACE_MCOUNT_RECORD 368da3821bSSteven Rostedt bool 37555f386cSMike Frysinger help 385fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 398da3821bSSteven Rostedt 4066700001SJosh Stoneconfig HAVE_SYSCALL_TRACEPOINTS 41ee08c6ecSFrederic Weisbecker bool 42555f386cSMike Frysinger help 435fb94e9cSMauro Carvalho Chehab See Documentation/trace/ftrace-design.rst 44ee08c6ecSFrederic Weisbecker 45a2546faeSSteven Rostedtconfig HAVE_FENTRY 46a2546faeSSteven Rostedt bool 47a2546faeSSteven Rostedt help 48a2546faeSSteven Rostedt Arch supports the gcc options -pg with -mfentry 49a2546faeSSteven Rostedt 50cf4db259SSteven Rostedtconfig HAVE_C_RECORDMCOUNT 5172441cb1SSteven Rostedt bool 5272441cb1SSteven Rostedt help 5372441cb1SSteven Rostedt C version of recordmcount available? 5472441cb1SSteven Rostedt 55352ad25aSSteven Rostedtconfig TRACER_MAX_TRACE 56352ad25aSSteven Rostedt bool 57352ad25aSSteven Rostedt 58ea632e9fSJosh Triplettconfig TRACE_CLOCK 59ea632e9fSJosh Triplett bool 60ea632e9fSJosh Triplett 617a8e76a3SSteven Rostedtconfig RING_BUFFER 627a8e76a3SSteven Rostedt bool 63ea632e9fSJosh Triplett select TRACE_CLOCK 6422287688SSteven Rostedt (Red Hat) select IRQ_WORK 657a8e76a3SSteven Rostedt 6678d904b4SSteven Rostedtconfig FTRACE_NMI_ENTER 6778d904b4SSteven Rostedt bool 6878d904b4SSteven Rostedt depends on HAVE_FTRACE_NMI_ENTER 6978d904b4SSteven Rostedt default y 7078d904b4SSteven Rostedt 715f77a88bSTom Zanussiconfig EVENT_TRACING 72b11c53e1SZhaolei select CONTEXT_SWITCH_TRACER 7360f1d5e3SMasami Hiramatsu select GLOB 74b11c53e1SZhaolei bool 75b11c53e1SZhaolei 76b11c53e1SZhaoleiconfig CONTEXT_SWITCH_TRACER 775f77a88bSTom Zanussi bool 785f77a88bSTom Zanussi 7985bac32cSSteven Rostedtconfig RING_BUFFER_ALLOW_SWAP 8085bac32cSSteven Rostedt bool 8185bac32cSSteven Rostedt help 8285bac32cSSteven Rostedt Allow the use of ring_buffer_swap_cpu. 8385bac32cSSteven Rostedt Adds a very slight overhead to tracing when enabled. 8485bac32cSSteven Rostedt 855e0a0939SSteven Rostedt# All tracer options should select GENERIC_TRACER. For those options that are 865e0a0939SSteven Rostedt# enabled by all tracers (context switch and event tracer) they select TRACING. 875e0a0939SSteven Rostedt# This allows those options to appear when no other tracer is selected. But the 885e0a0939SSteven Rostedt# options do not appear when something else selects it. We need the two options 895e0a0939SSteven Rostedt# GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the 9040892367SRandy Dunlap# hiding of the automatic options. 915e0a0939SSteven Rostedt 92bc0c38d1SSteven Rostedtconfig TRACING 93bc0c38d1SSteven Rostedt bool 94bc0c38d1SSteven Rostedt select DEBUG_FS 957a8e76a3SSteven Rostedt select RING_BUFFER 96c2c80529SAl Viro select STACKTRACE if STACKTRACE_SUPPORT 975f87f112SIngo Molnar select TRACEPOINTS 98f3384b28SSteven Rostedt select NOP_TRACER 99769b0441SFrederic Weisbecker select BINARY_PRINTF 1005f77a88bSTom Zanussi select EVENT_TRACING 101ea632e9fSJosh Triplett select TRACE_CLOCK 102bc0c38d1SSteven Rostedt 1035e0a0939SSteven Rostedtconfig GENERIC_TRACER 1045e0a0939SSteven Rostedt bool 1055e0a0939SSteven Rostedt select TRACING 1065e0a0939SSteven Rostedt 10740ada30fSIngo Molnar# 10840ada30fSIngo Molnar# Minimum requirements an architecture has to meet for us to 10940ada30fSIngo Molnar# be able to offer generic tracing facilities: 11040ada30fSIngo Molnar# 11140ada30fSIngo Molnarconfig TRACING_SUPPORT 11240ada30fSIngo Molnar bool 1130ea5ee03SMichael Ellerman depends on TRACE_IRQFLAGS_SUPPORT 11440ada30fSIngo Molnar depends on STACKTRACE_SUPPORT 115422d3c7aSKOSAKI Motohiro default y 11640ada30fSIngo Molnar 11740ada30fSIngo Molnarif TRACING_SUPPORT 11840ada30fSIngo Molnar 1194ed9f071SSteven Rostedtmenuconfig FTRACE 1204ed9f071SSteven Rostedt bool "Tracers" 12165b77242SSteven Rostedt default y if DEBUG_KERNEL 1224ed9f071SSteven Rostedt help 1234ed9f071SSteven Rostedt Enable the kernel tracing infrastructure. 1244ed9f071SSteven Rostedt 1254ed9f071SSteven Rostedtif FTRACE 12617d80fd0SPeter Zijlstra 127606576ceSSteven Rostedtconfig FUNCTION_TRACER 1281b29b018SSteven Rostedt bool "Kernel Function Tracer" 129606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 1304d7a077cSSteven Rostedt select KALLSYMS 1315e0a0939SSteven Rostedt select GENERIC_TRACER 13235e8e302SSteven Rostedt select CONTEXT_SWITCH_TRACER 13360f1d5e3SMasami Hiramatsu select GLOB 1340598e4f0SSteven Rostedt (VMware) select TASKS_RCU if PREEMPT 1351b29b018SSteven Rostedt help 1361b29b018SSteven Rostedt Enable the kernel to trace every kernel function. This is done 1371b29b018SSteven Rostedt by using a compiler feature to insert a small, 5-byte No-Operation 13840892367SRandy Dunlap instruction at the beginning of every kernel function, which NOP 1391b29b018SSteven Rostedt sequence is then dynamically patched into a tracer call when 1401b29b018SSteven Rostedt tracing is enabled by the administrator. If it's runtime disabled 1411b29b018SSteven Rostedt (the bootup default), then the overhead of the instructions is very 1421b29b018SSteven Rostedt small and not measurable even in micro-benchmarks. 14335e8e302SSteven Rostedt 144fb52607aSFrederic Weisbeckerconfig FUNCTION_GRAPH_TRACER 145fb52607aSFrederic Weisbecker bool "Kernel Function Graph Tracer" 146fb52607aSFrederic Weisbecker depends on HAVE_FUNCTION_GRAPH_TRACER 14715e6cb36SFrederic Weisbecker depends on FUNCTION_TRACER 148eb4a0378SSteven Rostedt depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE 149764f3b95SIngo Molnar default y 15015e6cb36SFrederic Weisbecker help 151fb52607aSFrederic Weisbecker Enable the kernel to trace a function at both its return 152fb52607aSFrederic Weisbecker and its entry. 153692105b8SMatt LaPlante Its first purpose is to trace the duration of functions and 154692105b8SMatt LaPlante draw a call graph for each thread with some information like 155692105b8SMatt LaPlante the return value. This is done by setting the current return 156692105b8SMatt LaPlante address on the current task structure into a stack of calls. 15715e6cb36SFrederic Weisbecker 158bac429f0SSteven Rostedt 159d5915816SJoel Fernandesconfig PREEMPTIRQ_EVENTS 160d5915816SJoel Fernandes bool "Enable trace events for preempt and irq disable/enable" 161d5915816SJoel Fernandes select TRACE_IRQFLAGS 162d5915816SJoel Fernandes depends on DEBUG_PREEMPT || !PROVE_LOCKING 1632dde6b00SArnd Bergmann depends on TRACING 164d5915816SJoel Fernandes default n 165d5915816SJoel Fernandes help 166d5915816SJoel Fernandes Enable tracing of disable and enable events for preemption and irqs. 167d5915816SJoel Fernandes For tracing preempt disable/enable events, DEBUG_PREEMPT must be 168d5915816SJoel Fernandes enabled. For tracing irq disable/enable events, PROVE_LOCKING must 169d5915816SJoel Fernandes be disabled. 170d5915816SJoel Fernandes 17181d68a96SSteven Rostedtconfig IRQSOFF_TRACER 17281d68a96SSteven Rostedt bool "Interrupts-off Latency Tracer" 17381d68a96SSteven Rostedt default n 17481d68a96SSteven Rostedt depends on TRACE_IRQFLAGS_SUPPORT 175592913ecSJohn Stultz depends on !ARCH_USES_GETTIMEOFFSET 17681d68a96SSteven Rostedt select TRACE_IRQFLAGS 1775e0a0939SSteven Rostedt select GENERIC_TRACER 17881d68a96SSteven Rostedt select TRACER_MAX_TRACE 17985bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 18022cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 1810b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 18281d68a96SSteven Rostedt help 18381d68a96SSteven Rostedt This option measures the time spent in irqs-off critical 18481d68a96SSteven Rostedt sections, with microsecond accuracy. 18581d68a96SSteven Rostedt 18681d68a96SSteven Rostedt The default measurement method is a maximum search, which is 18781d68a96SSteven Rostedt disabled by default and can be runtime (re-)started 18881d68a96SSteven Rostedt via: 18981d68a96SSteven Rostedt 190156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 19181d68a96SSteven Rostedt 19240892367SRandy Dunlap (Note that kernel size and overhead increase with this option 1936cd8a4bbSSteven Rostedt enabled. This option and the preempt-off timing option can be 1946cd8a4bbSSteven Rostedt used together or separately.) 1956cd8a4bbSSteven Rostedt 1966cd8a4bbSSteven Rostedtconfig PREEMPT_TRACER 1976cd8a4bbSSteven Rostedt bool "Preemption-off Latency Tracer" 1986cd8a4bbSSteven Rostedt default n 199592913ecSJohn Stultz depends on !ARCH_USES_GETTIMEOFFSET 2006cd8a4bbSSteven Rostedt depends on PREEMPT 2015e0a0939SSteven Rostedt select GENERIC_TRACER 2026cd8a4bbSSteven Rostedt select TRACER_MAX_TRACE 20385bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 20422cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 2050b85ffc2SSteven Rostedt (Red Hat) select TRACER_SNAPSHOT_PER_CPU_SWAP 2066cd8a4bbSSteven Rostedt help 20740892367SRandy Dunlap This option measures the time spent in preemption-off critical 2086cd8a4bbSSteven Rostedt sections, with microsecond accuracy. 2096cd8a4bbSSteven Rostedt 2106cd8a4bbSSteven Rostedt The default measurement method is a maximum search, which is 2116cd8a4bbSSteven Rostedt disabled by default and can be runtime (re-)started 2126cd8a4bbSSteven Rostedt via: 2136cd8a4bbSSteven Rostedt 214156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 2156cd8a4bbSSteven Rostedt 21640892367SRandy Dunlap (Note that kernel size and overhead increase with this option 2176cd8a4bbSSteven Rostedt enabled. This option and the irqs-off timing option can be 2186cd8a4bbSSteven Rostedt used together or separately.) 2196cd8a4bbSSteven Rostedt 220352ad25aSSteven Rostedtconfig SCHED_TRACER 221352ad25aSSteven Rostedt bool "Scheduling Latency Tracer" 2225e0a0939SSteven Rostedt select GENERIC_TRACER 223352ad25aSSteven Rostedt select CONTEXT_SWITCH_TRACER 224352ad25aSSteven Rostedt select TRACER_MAX_TRACE 22522cffc2bSSteven Rostedt (Red Hat) select TRACER_SNAPSHOT 226352ad25aSSteven Rostedt help 227352ad25aSSteven Rostedt This tracer tracks the latency of the highest priority task 228352ad25aSSteven Rostedt to be scheduled in, starting from the point it has woken up. 229352ad25aSSteven Rostedt 230e7c15cd8SSteven Rostedt (Red Hat)config HWLAT_TRACER 231e7c15cd8SSteven Rostedt (Red Hat) bool "Tracer to detect hardware latencies (like SMIs)" 232e7c15cd8SSteven Rostedt (Red Hat) select GENERIC_TRACER 233e7c15cd8SSteven Rostedt (Red Hat) help 234e7c15cd8SSteven Rostedt (Red Hat) This tracer, when enabled will create one or more kernel threads, 235c5c1ea75SJesper Dangaard Brouer depending on what the cpumask file is set to, which each thread 236e7c15cd8SSteven Rostedt (Red Hat) spinning in a loop looking for interruptions caused by 237e7c15cd8SSteven Rostedt (Red Hat) something other than the kernel. For example, if a 238e7c15cd8SSteven Rostedt (Red Hat) System Management Interrupt (SMI) takes a noticeable amount of 239e7c15cd8SSteven Rostedt (Red Hat) time, this tracer will detect it. This is useful for testing 240e7c15cd8SSteven Rostedt (Red Hat) if a system is reliable for Real Time tasks. 241e7c15cd8SSteven Rostedt (Red Hat) 242e7c15cd8SSteven Rostedt (Red Hat) Some files are created in the tracing directory when this 243e7c15cd8SSteven Rostedt (Red Hat) is enabled: 244e7c15cd8SSteven Rostedt (Red Hat) 245e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/width - time in usecs for how long to spin for 246e7c15cd8SSteven Rostedt (Red Hat) hwlat_detector/window - time in usecs between the start of each 247e7c15cd8SSteven Rostedt (Red Hat) iteration 248e7c15cd8SSteven Rostedt (Red Hat) 249e7c15cd8SSteven Rostedt (Red Hat) A kernel thread is created that will spin with interrupts disabled 250c5c1ea75SJesper Dangaard Brouer for "width" microseconds in every "window" cycle. It will not spin 251e7c15cd8SSteven Rostedt (Red Hat) for "window - width" microseconds, where the system can 252e7c15cd8SSteven Rostedt (Red Hat) continue to operate. 253e7c15cd8SSteven Rostedt (Red Hat) 254e7c15cd8SSteven Rostedt (Red Hat) The output will appear in the trace and trace_pipe files. 255e7c15cd8SSteven Rostedt (Red Hat) 256e7c15cd8SSteven Rostedt (Red Hat) When the tracer is not running, it has no affect on the system, 257e7c15cd8SSteven Rostedt (Red Hat) but when it is running, it can cause the system to be 258e7c15cd8SSteven Rostedt (Red Hat) periodically non responsive. Do not run this tracer on a 259e7c15cd8SSteven Rostedt (Red Hat) production system. 260e7c15cd8SSteven Rostedt (Red Hat) 261e7c15cd8SSteven Rostedt (Red Hat) To enable this tracer, echo in "hwlat" into the current_tracer 262e7c15cd8SSteven Rostedt (Red Hat) file. Every time a latency is greater than tracing_thresh, it will 263e7c15cd8SSteven Rostedt (Red Hat) be recorded into the ring buffer. 264e7c15cd8SSteven Rostedt (Red Hat) 265897f17a6SSteven Rostedtconfig ENABLE_DEFAULT_TRACERS 266897f17a6SSteven Rostedt bool "Trace process context switches and events" 2675e0a0939SSteven Rostedt depends on !GENERIC_TRACER 268b77e38aaSSteven Rostedt select TRACING 269b77e38aaSSteven Rostedt help 27040892367SRandy Dunlap This tracer hooks to various trace points in the kernel, 271b77e38aaSSteven Rostedt allowing the user to pick and choose which trace point they 272897f17a6SSteven Rostedt want to trace. It also includes the sched_switch tracer plugin. 273a7abe97fSSteven Rostedt 274ee08c6ecSFrederic Weisbeckerconfig FTRACE_SYSCALLS 275ee08c6ecSFrederic Weisbecker bool "Trace syscalls" 27666700001SJosh Stone depends on HAVE_SYSCALL_TRACEPOINTS 2775e0a0939SSteven Rostedt select GENERIC_TRACER 2780ea1c415SFrederic Weisbecker select KALLSYMS 279ee08c6ecSFrederic Weisbecker help 280ee08c6ecSFrederic Weisbecker Basic tracer to catch the syscall entry and exit events. 281ee08c6ecSFrederic Weisbecker 282debdd57fSHiraku Toyookaconfig TRACER_SNAPSHOT 283debdd57fSHiraku Toyooka bool "Create a snapshot trace buffer" 284debdd57fSHiraku Toyooka select TRACER_MAX_TRACE 285debdd57fSHiraku Toyooka help 286debdd57fSHiraku Toyooka Allow tracing users to take snapshot of the current buffer using the 287debdd57fSHiraku Toyooka ftrace interface, e.g.: 288debdd57fSHiraku Toyooka 289debdd57fSHiraku Toyooka echo 1 > /sys/kernel/debug/tracing/snapshot 290debdd57fSHiraku Toyooka cat snapshot 291debdd57fSHiraku Toyooka 2920b85ffc2SSteven Rostedt (Red Hat)config TRACER_SNAPSHOT_PER_CPU_SWAP 2930b85ffc2SSteven Rostedt (Red Hat) bool "Allow snapshot to swap per CPU" 2940b85ffc2SSteven Rostedt (Red Hat) depends on TRACER_SNAPSHOT 2950b85ffc2SSteven Rostedt (Red Hat) select RING_BUFFER_ALLOW_SWAP 2960b85ffc2SSteven Rostedt (Red Hat) help 2970b85ffc2SSteven Rostedt (Red Hat) Allow doing a snapshot of a single CPU buffer instead of a 2980b85ffc2SSteven Rostedt (Red Hat) full swap (all buffers). If this is set, then the following is 2990b85ffc2SSteven Rostedt (Red Hat) allowed: 3000b85ffc2SSteven Rostedt (Red Hat) 3010b85ffc2SSteven Rostedt (Red Hat) echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot 3020b85ffc2SSteven Rostedt (Red Hat) 3030b85ffc2SSteven Rostedt (Red Hat) After which, only the tracing buffer for CPU 2 was swapped with 3040b85ffc2SSteven Rostedt (Red Hat) the main tracing buffer, and the other CPU buffers remain the same. 3050b85ffc2SSteven Rostedt (Red Hat) 3060b85ffc2SSteven Rostedt (Red Hat) When this is enabled, this adds a little more overhead to the 3070b85ffc2SSteven Rostedt (Red Hat) trace recording, as it needs to add some checks to synchronize 3080b85ffc2SSteven Rostedt (Red Hat) recording with swaps. But this does not affect the performance 3090b85ffc2SSteven Rostedt (Red Hat) of the overall system. This is enabled by default when the preempt 3100b85ffc2SSteven Rostedt (Red Hat) or irq latency tracers are enabled, as those need to swap as well 3110b85ffc2SSteven Rostedt (Red Hat) and already adds the overhead (plus a lot more). 3120b85ffc2SSteven Rostedt (Red Hat) 3132ed84eebSSteven Rostedtconfig TRACE_BRANCH_PROFILING 3149ae5b879SSteven Rostedt bool 3155e0a0939SSteven Rostedt select GENERIC_TRACER 3169ae5b879SSteven Rostedt 3179ae5b879SSteven Rostedtchoice 3189ae5b879SSteven Rostedt prompt "Branch Profiling" 3199ae5b879SSteven Rostedt default BRANCH_PROFILE_NONE 3209ae5b879SSteven Rostedt help 3219ae5b879SSteven Rostedt The branch profiling is a software profiler. It will add hooks 3229ae5b879SSteven Rostedt into the C conditionals to test which path a branch takes. 3239ae5b879SSteven Rostedt 3249ae5b879SSteven Rostedt The likely/unlikely profiler only looks at the conditions that 3259ae5b879SSteven Rostedt are annotated with a likely or unlikely macro. 3269ae5b879SSteven Rostedt 32740892367SRandy Dunlap The "all branch" profiler will profile every if-statement in the 3289ae5b879SSteven Rostedt kernel. This profiler will also enable the likely/unlikely 32940892367SRandy Dunlap profiler. 3309ae5b879SSteven Rostedt 33140892367SRandy Dunlap Either of the above profilers adds a bit of overhead to the system. 33240892367SRandy Dunlap If unsure, choose "No branch profiling". 3339ae5b879SSteven Rostedt 3349ae5b879SSteven Rostedtconfig BRANCH_PROFILE_NONE 3359ae5b879SSteven Rostedt bool "No branch profiling" 3369ae5b879SSteven Rostedt help 3379ae5b879SSteven Rostedt No branch profiling. Branch profiling adds a bit of overhead. 3389ae5b879SSteven Rostedt Only enable it if you want to analyse the branching behavior. 3399ae5b879SSteven Rostedt Otherwise keep it disabled. 3409ae5b879SSteven Rostedt 3419ae5b879SSteven Rostedtconfig PROFILE_ANNOTATED_BRANCHES 3429ae5b879SSteven Rostedt bool "Trace likely/unlikely profiler" 3439ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 3441f0d69a9SSteven Rostedt help 34559bf8964SMasanari Iida This tracer profiles all likely and unlikely macros 3461f0d69a9SSteven Rostedt in the kernel. It will display the results in: 3471f0d69a9SSteven Rostedt 34813e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_annotated 3491f0d69a9SSteven Rostedt 35040892367SRandy Dunlap Note: this will add a significant overhead; only turn this 3511f0d69a9SSteven Rostedt on if you need to profile the system's use of these macros. 3521f0d69a9SSteven Rostedt 3532bcd521aSSteven Rostedtconfig PROFILE_ALL_BRANCHES 35468e76e03SRandy Dunlap bool "Profile all if conditionals" if !FORTIFY_SOURCE 3559ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 3562bcd521aSSteven Rostedt help 3572bcd521aSSteven Rostedt This tracer profiles all branch conditions. Every if () 3582bcd521aSSteven Rostedt taken in the kernel is recorded whether it hit or miss. 3592bcd521aSSteven Rostedt The results will be displayed in: 3602bcd521aSSteven Rostedt 36113e5befaSDavid Rientjes /sys/kernel/debug/tracing/trace_stat/branch_all 3622bcd521aSSteven Rostedt 3639ae5b879SSteven Rostedt This option also enables the likely/unlikely profiler. 3649ae5b879SSteven Rostedt 3652bcd521aSSteven Rostedt This configuration, when enabled, will impose a great overhead 3662bcd521aSSteven Rostedt on the system. This should only be enabled when the system 36740892367SRandy Dunlap is to be analyzed in much detail. 3689ae5b879SSteven Rostedtendchoice 3692bcd521aSSteven Rostedt 3702ed84eebSSteven Rostedtconfig TRACING_BRANCHES 37152f232cbSSteven Rostedt bool 37252f232cbSSteven Rostedt help 37352f232cbSSteven Rostedt Selected by tracers that will trace the likely and unlikely 37452f232cbSSteven Rostedt conditions. This prevents the tracers themselves from being 37552f232cbSSteven Rostedt profiled. Profiling the tracing infrastructure can only happen 37652f232cbSSteven Rostedt when the likelys and unlikelys are not being traced. 37752f232cbSSteven Rostedt 3782ed84eebSSteven Rostedtconfig BRANCH_TRACER 37952f232cbSSteven Rostedt bool "Trace likely/unlikely instances" 3802ed84eebSSteven Rostedt depends on TRACE_BRANCH_PROFILING 3812ed84eebSSteven Rostedt select TRACING_BRANCHES 38252f232cbSSteven Rostedt help 38352f232cbSSteven Rostedt This traces the events of likely and unlikely condition 38452f232cbSSteven Rostedt calls in the kernel. The difference between this and the 38552f232cbSSteven Rostedt "Trace likely/unlikely profiler" is that this is not a 38652f232cbSSteven Rostedt histogram of the callers, but actually places the calling 38752f232cbSSteven Rostedt events into a running trace buffer to see when and where the 38852f232cbSSteven Rostedt events happened, as well as their results. 38952f232cbSSteven Rostedt 39052f232cbSSteven Rostedt Say N if unsure. 39152f232cbSSteven Rostedt 392e5a81b62SSteven Rostedtconfig STACK_TRACER 393e5a81b62SSteven Rostedt bool "Trace max stack" 394606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 395606576ceSSteven Rostedt select FUNCTION_TRACER 396e5a81b62SSteven Rostedt select STACKTRACE 3974d7a077cSSteven Rostedt select KALLSYMS 398e5a81b62SSteven Rostedt help 3994519d9e5SIngo Molnar This special tracer records the maximum stack footprint of the 400156f5a78SGeunSik Lim kernel and displays it in /sys/kernel/debug/tracing/stack_trace. 4014519d9e5SIngo Molnar 4024519d9e5SIngo Molnar This tracer works by hooking into every function call that the 4034519d9e5SIngo Molnar kernel executes, and keeping a maximum stack depth value and 404f38f1d2aSSteven Rostedt stack-trace saved. If this is configured with DYNAMIC_FTRACE 405f38f1d2aSSteven Rostedt then it will not have any overhead while the stack tracer 406f38f1d2aSSteven Rostedt is disabled. 407f38f1d2aSSteven Rostedt 408f38f1d2aSSteven Rostedt To enable the stack tracer on bootup, pass in 'stacktrace' 409f38f1d2aSSteven Rostedt on the kernel command line. 410f38f1d2aSSteven Rostedt 411f38f1d2aSSteven Rostedt The stack tracer can also be enabled or disabled via the 412f38f1d2aSSteven Rostedt sysctl kernel.stack_tracer_enabled 4134519d9e5SIngo Molnar 4144519d9e5SIngo Molnar Say N if unsure. 415e5a81b62SSteven Rostedt 4162db270a8SFrederic Weisbeckerconfig BLK_DEV_IO_TRACE 41740892367SRandy Dunlap bool "Support for tracing block IO actions" 4182db270a8SFrederic Weisbecker depends on SYSFS 4191dfba05dSIngo Molnar depends on BLOCK 4202db270a8SFrederic Weisbecker select RELAY 4212db270a8SFrederic Weisbecker select DEBUG_FS 4222db270a8SFrederic Weisbecker select TRACEPOINTS 4235e0a0939SSteven Rostedt select GENERIC_TRACER 4242db270a8SFrederic Weisbecker select STACKTRACE 4252db270a8SFrederic Weisbecker help 4262db270a8SFrederic Weisbecker Say Y here if you want to be able to trace the block layer actions 4272db270a8SFrederic Weisbecker on a given queue. Tracing allows you to see any traffic happening 4282db270a8SFrederic Weisbecker on a block device queue. For more information (and the userspace 4292db270a8SFrederic Weisbecker support tools needed), fetch the blktrace tools from: 4302db270a8SFrederic Weisbecker 4312db270a8SFrederic Weisbecker git://git.kernel.dk/blktrace.git 4322db270a8SFrederic Weisbecker 4332db270a8SFrederic Weisbecker Tracing also is possible using the ftrace interface, e.g.: 4342db270a8SFrederic Weisbecker 4352db270a8SFrederic Weisbecker echo 1 > /sys/block/sda/sda1/trace/enable 4362db270a8SFrederic Weisbecker echo blk > /sys/kernel/debug/tracing/current_tracer 4372db270a8SFrederic Weisbecker cat /sys/kernel/debug/tracing/trace_pipe 4382db270a8SFrederic Weisbecker 4392db270a8SFrederic Weisbecker If unsure, say N. 44036994e58SFrederic Weisbecker 4416b0b7551SAnton Blanchardconfig KPROBE_EVENTS 442413d37d1SMasami Hiramatsu depends on KPROBES 443f850c30cSHeiko Carstens depends on HAVE_REGS_AND_STACK_ACCESS_API 44477b44d1bSMasami Hiramatsu bool "Enable kprobes-based dynamic events" 445413d37d1SMasami Hiramatsu select TRACING 4468ab83f56SSrikar Dronamraju select PROBE_EVENTS 44777b44d1bSMasami Hiramatsu default y 448413d37d1SMasami Hiramatsu help 44940892367SRandy Dunlap This allows the user to add tracing events (similar to tracepoints) 45040892367SRandy Dunlap on the fly via the ftrace interface. See 4515fb94e9cSMauro Carvalho Chehab Documentation/trace/kprobetrace.rst for more details. 45277b44d1bSMasami Hiramatsu 45377b44d1bSMasami Hiramatsu Those events can be inserted wherever kprobes can probe, and record 45477b44d1bSMasami Hiramatsu various register and memory values. 45577b44d1bSMasami Hiramatsu 45640892367SRandy Dunlap This option is also required by perf-probe subcommand of perf tools. 45740892367SRandy Dunlap If you want to use perf tools, this option is strongly recommended. 458413d37d1SMasami Hiramatsu 459*45408c4fSMasami Hiramatsuconfig KPROBE_EVENTS_ON_NOTRACE 460*45408c4fSMasami Hiramatsu bool "Do NOT protect notrace function from kprobe events" 461*45408c4fSMasami Hiramatsu depends on KPROBE_EVENTS 462*45408c4fSMasami Hiramatsu depends on KPROBES_ON_FTRACE 463*45408c4fSMasami Hiramatsu default n 464*45408c4fSMasami Hiramatsu help 465*45408c4fSMasami Hiramatsu This is only for the developers who want to debug ftrace itself 466*45408c4fSMasami Hiramatsu using kprobe events. 467*45408c4fSMasami Hiramatsu 468*45408c4fSMasami Hiramatsu If kprobes can use ftrace instead of breakpoint, ftrace related 469*45408c4fSMasami Hiramatsu functions are protected from kprobe-events to prevent an infinit 470*45408c4fSMasami Hiramatsu recursion or any unexpected execution path which leads to a kernel 471*45408c4fSMasami Hiramatsu crash. 472*45408c4fSMasami Hiramatsu 473*45408c4fSMasami Hiramatsu This option disables such protection and allows you to put kprobe 474*45408c4fSMasami Hiramatsu events on ftrace functions for debugging ftrace by itself. 475*45408c4fSMasami Hiramatsu Note that this might let you shoot yourself in the foot. 476*45408c4fSMasami Hiramatsu 477*45408c4fSMasami Hiramatsu If unsure, say N. 478*45408c4fSMasami Hiramatsu 4796b0b7551SAnton Blanchardconfig UPROBE_EVENTS 480f3f096cfSSrikar Dronamraju bool "Enable uprobes-based dynamic events" 481f3f096cfSSrikar Dronamraju depends on ARCH_SUPPORTS_UPROBES 482f3f096cfSSrikar Dronamraju depends on MMU 48309294e31SDavid A. Long depends on PERF_EVENTS 484f3f096cfSSrikar Dronamraju select UPROBES 485f3f096cfSSrikar Dronamraju select PROBE_EVENTS 486f3f096cfSSrikar Dronamraju select TRACING 48761f35d75SArnaldo Carvalho de Melo default y 488f3f096cfSSrikar Dronamraju help 489f3f096cfSSrikar Dronamraju This allows the user to add tracing events on top of userspace 490f3f096cfSSrikar Dronamraju dynamic events (similar to tracepoints) on the fly via the trace 491f3f096cfSSrikar Dronamraju events interface. Those events can be inserted wherever uprobes 492f3f096cfSSrikar Dronamraju can probe, and record various registers. 493f3f096cfSSrikar Dronamraju This option is required if you plan to use perf-probe subcommand 494f3f096cfSSrikar Dronamraju of perf tools on user space applications. 495f3f096cfSSrikar Dronamraju 496e1abf2ccSIngo Molnarconfig BPF_EVENTS 497e1abf2ccSIngo Molnar depends on BPF_SYSCALL 4986b0b7551SAnton Blanchard depends on (KPROBE_EVENTS || UPROBE_EVENTS) && PERF_EVENTS 499e1abf2ccSIngo Molnar bool 500e1abf2ccSIngo Molnar default y 501e1abf2ccSIngo Molnar help 502e1abf2ccSIngo Molnar This allows the user to attach BPF programs to kprobe events. 503e1abf2ccSIngo Molnar 5048ab83f56SSrikar Dronamrajuconfig PROBE_EVENTS 5058ab83f56SSrikar Dronamraju def_bool n 5068ab83f56SSrikar Dronamraju 5073d083395SSteven Rostedtconfig DYNAMIC_FTRACE 508db05021dSSteven Rostedt bool "enable/disable function tracing dynamically" 509606576ceSSteven Rostedt depends on FUNCTION_TRACER 510677aa9f7SSteven Rostedt depends on HAVE_DYNAMIC_FTRACE 5113d083395SSteven Rostedt default y 5123d083395SSteven Rostedt help 513db05021dSSteven Rostedt This option will modify all the calls to function tracing 514db05021dSSteven Rostedt dynamically (will patch them out of the binary image and 515db05021dSSteven Rostedt replace them with a No-Op instruction) on boot up. During 516db05021dSSteven Rostedt compile time, a table is made of all the locations that ftrace 517db05021dSSteven Rostedt can function trace, and this table is linked into the kernel 518db05021dSSteven Rostedt image. When this is enabled, functions can be individually 519db05021dSSteven Rostedt enabled, and the functions not enabled will not affect 520db05021dSSteven Rostedt performance of the system. 521db05021dSSteven Rostedt 522db05021dSSteven Rostedt See the files in /sys/kernel/debug/tracing: 523db05021dSSteven Rostedt available_filter_functions 524db05021dSSteven Rostedt set_ftrace_filter 525db05021dSSteven Rostedt set_ftrace_notrace 5263d083395SSteven Rostedt 52740892367SRandy Dunlap This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but 52840892367SRandy Dunlap otherwise has native performance as long as no tracing is active. 5293d083395SSteven Rostedt 53006aeaaeaSMasami Hiramatsuconfig DYNAMIC_FTRACE_WITH_REGS 53106aeaaeaSMasami Hiramatsu def_bool y 53206aeaaeaSMasami Hiramatsu depends on DYNAMIC_FTRACE 53306aeaaeaSMasami Hiramatsu depends on HAVE_DYNAMIC_FTRACE_WITH_REGS 53406aeaaeaSMasami Hiramatsu 535bac429f0SSteven Rostedtconfig FUNCTION_PROFILER 536bac429f0SSteven Rostedt bool "Kernel function profiler" 537493762fcSSteven Rostedt depends on FUNCTION_TRACER 538bac429f0SSteven Rostedt default n 539bac429f0SSteven Rostedt help 540493762fcSSteven Rostedt This option enables the kernel function profiler. A file is created 541493762fcSSteven Rostedt in debugfs called function_profile_enabled which defaults to zero. 542bac429f0SSteven Rostedt When a 1 is echoed into this file profiling begins, and when a 54340892367SRandy Dunlap zero is entered, profiling stops. A "functions" file is created in 54440892367SRandy Dunlap the trace_stats directory; this file shows the list of functions that 545bac429f0SSteven Rostedt have been hit and their counters. 546bac429f0SSteven Rostedt 54740892367SRandy Dunlap If in doubt, say N. 548bac429f0SSteven Rostedt 5499802d865SJosef Bacikconfig BPF_KPROBE_OVERRIDE 5509802d865SJosef Bacik bool "Enable BPF programs to override a kprobed function" 5519802d865SJosef Bacik depends on BPF_EVENTS 552540adea3SMasami Hiramatsu depends on FUNCTION_ERROR_INJECTION 5539802d865SJosef Bacik default n 5549802d865SJosef Bacik help 5559802d865SJosef Bacik Allows BPF to override the execution of a probed function and 5569802d865SJosef Bacik set a different return value. This is used for error injection. 5579802d865SJosef Bacik 5588da3821bSSteven Rostedtconfig FTRACE_MCOUNT_RECORD 5598da3821bSSteven Rostedt def_bool y 5608da3821bSSteven Rostedt depends on DYNAMIC_FTRACE 5618da3821bSSteven Rostedt depends on HAVE_FTRACE_MCOUNT_RECORD 5628da3821bSSteven Rostedt 56360a11774SSteven Rostedtconfig FTRACE_SELFTEST 56460a11774SSteven Rostedt bool 56560a11774SSteven Rostedt 56660a11774SSteven Rostedtconfig FTRACE_STARTUP_TEST 56760a11774SSteven Rostedt bool "Perform a startup test on ftrace" 5685e0a0939SSteven Rostedt depends on GENERIC_TRACER 56960a11774SSteven Rostedt select FTRACE_SELFTEST 57060a11774SSteven Rostedt help 57160a11774SSteven Rostedt This option performs a series of startup tests on ftrace. On bootup 57260a11774SSteven Rostedt a series of tests are made to verify that the tracer is 57360a11774SSteven Rostedt functioning properly. It will do tests on all the configured 57460a11774SSteven Rostedt tracers of ftrace. 57517d80fd0SPeter Zijlstra 5761f5a6b45SSteven Rostedtconfig EVENT_TRACE_TEST_SYSCALLS 5771f5a6b45SSteven Rostedt bool "Run selftest on syscall events" 5781f5a6b45SSteven Rostedt depends on FTRACE_STARTUP_TEST 5791f5a6b45SSteven Rostedt help 5801f5a6b45SSteven Rostedt This option will also enable testing every syscall event. 5811f5a6b45SSteven Rostedt It only enables the event and disables it and runs various loads 5821f5a6b45SSteven Rostedt with the event enabled. This adds a bit more time for kernel boot 5831f5a6b45SSteven Rostedt up since it runs this on every system call defined. 5841f5a6b45SSteven Rostedt 5851f5a6b45SSteven Rostedt TBD - enable a way to actually call the syscalls as we test their 5861f5a6b45SSteven Rostedt events 5871f5a6b45SSteven Rostedt 588fe6f90e5SPekka Paalanenconfig MMIOTRACE 589fe6f90e5SPekka Paalanen bool "Memory mapped IO tracing" 59040ada30fSIngo Molnar depends on HAVE_MMIOTRACE_SUPPORT && PCI 5915e0a0939SSteven Rostedt select GENERIC_TRACER 592fe6f90e5SPekka Paalanen help 593fe6f90e5SPekka Paalanen Mmiotrace traces Memory Mapped I/O access and is meant for 594fe6f90e5SPekka Paalanen debugging and reverse engineering. It is called from the ioremap 595fe6f90e5SPekka Paalanen implementation and works via page faults. Tracing is disabled by 596fe6f90e5SPekka Paalanen default and can be enabled at run-time. 597fe6f90e5SPekka Paalanen 5985fb94e9cSMauro Carvalho Chehab See Documentation/trace/mmiotrace.rst. 599fe6f90e5SPekka Paalanen If you are not helping to develop drivers, say N. 600fe6f90e5SPekka Paalanen 60108d43a5fSTom Zanussiconfig TRACING_MAP 60208d43a5fSTom Zanussi bool 60308d43a5fSTom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 60408d43a5fSTom Zanussi help 60508d43a5fSTom Zanussi tracing_map is a special-purpose lock-free map for tracing, 60608d43a5fSTom Zanussi separated out as a stand-alone facility in order to allow it 60708d43a5fSTom Zanussi to be shared between multiple tracers. It isn't meant to be 60808d43a5fSTom Zanussi generally used outside of that context, and is normally 60908d43a5fSTom Zanussi selected by tracers that use it. 61008d43a5fSTom Zanussi 6117ef224d1STom Zanussiconfig HIST_TRIGGERS 6127ef224d1STom Zanussi bool "Histogram triggers" 6137ef224d1STom Zanussi depends on ARCH_HAVE_NMI_SAFE_CMPXCHG 6147ef224d1STom Zanussi select TRACING_MAP 6157ad8fb61STom Zanussi select TRACING 6167ef224d1STom Zanussi default n 6177ef224d1STom Zanussi help 6187ef224d1STom Zanussi Hist triggers allow one or more arbitrary trace event fields 6197ef224d1STom Zanussi to be aggregated into hash tables and dumped to stdout by 6207ef224d1STom Zanussi reading a debugfs/tracefs file. They're useful for 6217ef224d1STom Zanussi gathering quick and dirty (though precise) summaries of 6227ef224d1STom Zanussi event activity as an initial guide for further investigation 6237ef224d1STom Zanussi using more advanced tools. 6247ef224d1STom Zanussi 62589e270c1STom Zanussi Inter-event tracing of quantities such as latencies is also 62689e270c1STom Zanussi supported using hist triggers under this option. 62789e270c1STom Zanussi 62889e270c1STom Zanussi See Documentation/trace/histogram.txt. 6297ef224d1STom Zanussi If in doubt, say N. 6307ef224d1STom Zanussi 631fe6f90e5SPekka Paalanenconfig MMIOTRACE_TEST 632fe6f90e5SPekka Paalanen tristate "Test module for mmiotrace" 633fe6f90e5SPekka Paalanen depends on MMIOTRACE && m 634fe6f90e5SPekka Paalanen help 635fe6f90e5SPekka Paalanen This is a dumb module for testing mmiotrace. It is very dangerous 636fe6f90e5SPekka Paalanen as it will write garbage to IO memory starting at a given address. 637fe6f90e5SPekka Paalanen However, it should be safe to use on e.g. unused portion of VRAM. 638fe6f90e5SPekka Paalanen 639fe6f90e5SPekka Paalanen Say N, unless you absolutely know what you are doing. 640fe6f90e5SPekka Paalanen 64181dc9f0eSSteven Rostedt (Red Hat)config TRACEPOINT_BENCHMARK 64281dc9f0eSSteven Rostedt (Red Hat) bool "Add tracepoint that benchmarks tracepoints" 64381dc9f0eSSteven Rostedt (Red Hat) help 64481dc9f0eSSteven Rostedt (Red Hat) This option creates the tracepoint "benchmark:benchmark_event". 64581dc9f0eSSteven Rostedt (Red Hat) When the tracepoint is enabled, it kicks off a kernel thread that 64681dc9f0eSSteven Rostedt (Red Hat) goes into an infinite loop (calling cond_sched() to let other tasks 64781dc9f0eSSteven Rostedt (Red Hat) run), and calls the tracepoint. Each iteration will record the time 64881dc9f0eSSteven Rostedt (Red Hat) it took to write to the tracepoint and the next iteration that 64981dc9f0eSSteven Rostedt (Red Hat) data will be passed to the tracepoint itself. That is, the tracepoint 65081dc9f0eSSteven Rostedt (Red Hat) will report the time it took to do the previous tracepoint. 65181dc9f0eSSteven Rostedt (Red Hat) The string written to the tracepoint is a static string of 128 bytes 65281dc9f0eSSteven Rostedt (Red Hat) to keep the time the same. The initial string is simply a write of 65381dc9f0eSSteven Rostedt (Red Hat) "START". The second string records the cold cache time of the first 65481dc9f0eSSteven Rostedt (Red Hat) write which is not added to the rest of the calculations. 65581dc9f0eSSteven Rostedt (Red Hat) 65681dc9f0eSSteven Rostedt (Red Hat) As it is a tight loop, it benchmarks as hot cache. That's fine because 65781dc9f0eSSteven Rostedt (Red Hat) we care most about hot paths that are probably in cache already. 65881dc9f0eSSteven Rostedt (Red Hat) 65981dc9f0eSSteven Rostedt (Red Hat) An example of the output: 66081dc9f0eSSteven Rostedt (Red Hat) 66181dc9f0eSSteven Rostedt (Red Hat) START 66281dc9f0eSSteven Rostedt (Red Hat) first=3672 [COLD CACHED] 66381dc9f0eSSteven Rostedt (Red Hat) last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712 66481dc9f0eSSteven Rostedt (Red Hat) last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337 66581dc9f0eSSteven Rostedt (Red Hat) last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064 66681dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411 66781dc9f0eSSteven Rostedt (Red Hat) last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389 66881dc9f0eSSteven Rostedt (Red Hat) last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666 66981dc9f0eSSteven Rostedt (Red Hat) 67081dc9f0eSSteven Rostedt (Red Hat) 6715092dbc9SSteven Rostedtconfig RING_BUFFER_BENCHMARK 6725092dbc9SSteven Rostedt tristate "Ring buffer benchmark stress tester" 6735092dbc9SSteven Rostedt depends on RING_BUFFER 6745092dbc9SSteven Rostedt help 6755092dbc9SSteven Rostedt This option creates a test to stress the ring buffer and benchmark it. 67640892367SRandy Dunlap It creates its own ring buffer such that it will not interfere with 6775092dbc9SSteven Rostedt any other users of the ring buffer (such as ftrace). It then creates 6785092dbc9SSteven Rostedt a producer and consumer that will run for 10 seconds and sleep for 6795092dbc9SSteven Rostedt 10 seconds. Each interval it will print out the number of events 6805092dbc9SSteven Rostedt it recorded and give a rough estimate of how long each iteration took. 6815092dbc9SSteven Rostedt 6825092dbc9SSteven Rostedt It does not disable interrupts or raise its priority, so it may be 6835092dbc9SSteven Rostedt affected by processes that are running. 6845092dbc9SSteven Rostedt 68540892367SRandy Dunlap If unsure, say N. 6865092dbc9SSteven Rostedt 6876c43e554SSteven Rostedt (Red Hat)config RING_BUFFER_STARTUP_TEST 6886c43e554SSteven Rostedt (Red Hat) bool "Ring buffer startup self test" 6896c43e554SSteven Rostedt (Red Hat) depends on RING_BUFFER 6906c43e554SSteven Rostedt (Red Hat) help 6916c43e554SSteven Rostedt (Red Hat) Run a simple self test on the ring buffer on boot up. Late in the 6926c43e554SSteven Rostedt (Red Hat) kernel boot sequence, the test will start that kicks off 6936c43e554SSteven Rostedt (Red Hat) a thread per cpu. Each thread will write various size events 6946c43e554SSteven Rostedt (Red Hat) into the ring buffer. Another thread is created to send IPIs 6956c43e554SSteven Rostedt (Red Hat) to each of the threads, where the IPI handler will also write 6966c43e554SSteven Rostedt (Red Hat) to the ring buffer, to test/stress the nesting ability. 6976c43e554SSteven Rostedt (Red Hat) If any anomalies are discovered, a warning will be displayed 6986c43e554SSteven Rostedt (Red Hat) and all ring buffers will be disabled. 6996c43e554SSteven Rostedt (Red Hat) 7006c43e554SSteven Rostedt (Red Hat) The test runs for 10 seconds. This will slow your boot time 7016c43e554SSteven Rostedt (Red Hat) by at least 10 more seconds. 7026c43e554SSteven Rostedt (Red Hat) 7036c43e554SSteven Rostedt (Red Hat) At the end of the test, statics and more checks are done. 7046c43e554SSteven Rostedt (Red Hat) It will output the stats of each per cpu buffer. What 7056c43e554SSteven Rostedt (Red Hat) was written, the sizes, what was read, what was lost, and 7066c43e554SSteven Rostedt (Red Hat) other similar details. 7076c43e554SSteven Rostedt (Red Hat) 7086c43e554SSteven Rostedt (Red Hat) If unsure, say N 7096c43e554SSteven Rostedt (Red Hat) 710f96e8577SJoel Fernandes (Google)config PREEMPTIRQ_DELAY_TEST 711f96e8577SJoel Fernandes (Google) tristate "Preempt / IRQ disable delay thread to test latency tracers" 712f96e8577SJoel Fernandes (Google) depends on m 713f96e8577SJoel Fernandes (Google) help 714f96e8577SJoel Fernandes (Google) Select this option to build a test module that can help test latency 715f96e8577SJoel Fernandes (Google) tracers by executing a preempt or irq disable section with a user 716f96e8577SJoel Fernandes (Google) configurable delay. The module busy waits for the duration of the 717f96e8577SJoel Fernandes (Google) critical section. 718f96e8577SJoel Fernandes (Google) 719f96e8577SJoel Fernandes (Google) For example, the following invocation forces a one-time irq-disabled 720f96e8577SJoel Fernandes (Google) critical section for 500us: 721f96e8577SJoel Fernandes (Google) modprobe preemptirq_delay_test test_mode=irq delay=500000 722f96e8577SJoel Fernandes (Google) 723f96e8577SJoel Fernandes (Google) If unsure, say N 724f96e8577SJoel Fernandes (Google) 725681bec03SJeremy Lintonconfig TRACE_EVAL_MAP_FILE 726681bec03SJeremy Linton bool "Show eval mappings for trace events" 7279828413dSSteven Rostedt (Red Hat) depends on TRACING 7289828413dSSteven Rostedt (Red Hat) help 729681bec03SJeremy Linton The "print fmt" of the trace events will show the enum/sizeof names 730681bec03SJeremy Linton instead of their values. This can cause problems for user space tools 731681bec03SJeremy Linton that use this string to parse the raw data as user space does not know 7329828413dSSteven Rostedt (Red Hat) how to convert the string to its value. 7339828413dSSteven Rostedt (Red Hat) 7349828413dSSteven Rostedt (Red Hat) To fix this, there's a special macro in the kernel that can be used 735681bec03SJeremy Linton to convert an enum/sizeof into its value. If this macro is used, then 736681bec03SJeremy Linton the print fmt strings will be converted to their values. 7379828413dSSteven Rostedt (Red Hat) 7389828413dSSteven Rostedt (Red Hat) If something does not get converted properly, this option can be 739681bec03SJeremy Linton used to show what enums/sizeof the kernel tried to convert. 7409828413dSSteven Rostedt (Red Hat) 741681bec03SJeremy Linton This option is for debugging the conversions. A file is created 742681bec03SJeremy Linton in the tracing directory called "eval_map" that will show the 7439828413dSSteven Rostedt (Red Hat) names matched with their values and what trace event system they 7449828413dSSteven Rostedt (Red Hat) belong too. 7459828413dSSteven Rostedt (Red Hat) 7469828413dSSteven Rostedt (Red Hat) Normally, the mapping of the strings to values will be freed after 7479828413dSSteven Rostedt (Red Hat) boot up or module load. With this option, they will not be freed, as 748681bec03SJeremy Linton they are needed for the "eval_map" file. Enabling this option will 7499828413dSSteven Rostedt (Red Hat) increase the memory footprint of the running kernel. 7509828413dSSteven Rostedt (Red Hat) 7519828413dSSteven Rostedt (Red Hat) If unsure, say N 7529828413dSSteven Rostedt (Red Hat) 753ddd70280STal Shorerconfig TRACING_EVENTS_GPIO 754ddd70280STal Shorer bool "Trace gpio events" 755ddd70280STal Shorer depends on GPIOLIB 756ddd70280STal Shorer default y 757ddd70280STal Shorer help 758ddd70280STal Shorer Enable tracing events for gpio subsystem 759ddd70280STal Shorer 7604ed9f071SSteven Rostedtendif # FTRACE 76140ada30fSIngo Molnar 76240ada30fSIngo Molnarendif # TRACING_SUPPORT 76340ada30fSIngo Molnar 764