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 1540892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 1678d904b4SSteven Rostedt 17606576ceSSteven Rostedtconfig HAVE_FUNCTION_TRACER 1816444a8aSArnaldo Carvalho de Melo bool 19555f386cSMike Frysinger help 2040892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 21bc0c38d1SSteven Rostedt 22fb52607aSFrederic Weisbeckerconfig HAVE_FUNCTION_GRAPH_TRACER 2315e6cb36SFrederic Weisbecker bool 24555f386cSMike Frysinger help 2540892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 2615e6cb36SFrederic Weisbecker 2771e308a2SSteven Rostedtconfig HAVE_FUNCTION_GRAPH_FP_TEST 2871e308a2SSteven Rostedt bool 2971e308a2SSteven Rostedt help 3003688970SMike Frysinger See Documentation/trace/ftrace-design.txt 3171e308a2SSteven Rostedt 3260a7ecf4SSteven Rostedtconfig HAVE_FUNCTION_TRACE_MCOUNT_TEST 3360a7ecf4SSteven Rostedt bool 3460a7ecf4SSteven Rostedt help 3540892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 3660a7ecf4SSteven Rostedt 37677aa9f7SSteven Rostedtconfig HAVE_DYNAMIC_FTRACE 38677aa9f7SSteven Rostedt bool 39555f386cSMike Frysinger help 4040892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 41677aa9f7SSteven Rostedt 428da3821bSSteven Rostedtconfig HAVE_FTRACE_MCOUNT_RECORD 438da3821bSSteven Rostedt bool 44555f386cSMike Frysinger help 4540892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 468da3821bSSteven Rostedt 4766700001SJosh Stoneconfig HAVE_SYSCALL_TRACEPOINTS 48ee08c6ecSFrederic Weisbecker bool 49555f386cSMike Frysinger help 5040892367SRandy Dunlap See Documentation/trace/ftrace-design.txt 51ee08c6ecSFrederic Weisbecker 52*72441cb1SSteven Rostedtconfig HAVE_C_MCOUNT_RECORD 53*72441cb1SSteven Rostedt bool 54*72441cb1SSteven Rostedt help 55*72441cb1SSteven Rostedt C version of recordmcount available? 56*72441cb1SSteven Rostedt 57352ad25aSSteven Rostedtconfig TRACER_MAX_TRACE 58352ad25aSSteven Rostedt bool 59352ad25aSSteven Rostedt 607a8e76a3SSteven Rostedtconfig RING_BUFFER 617a8e76a3SSteven Rostedt bool 627a8e76a3SSteven Rostedt 6378d904b4SSteven Rostedtconfig FTRACE_NMI_ENTER 6478d904b4SSteven Rostedt bool 6578d904b4SSteven Rostedt depends on HAVE_FTRACE_NMI_ENTER 6678d904b4SSteven Rostedt default y 6778d904b4SSteven Rostedt 685f77a88bSTom Zanussiconfig EVENT_TRACING 69b11c53e1SZhaolei select CONTEXT_SWITCH_TRACER 70b11c53e1SZhaolei bool 71b11c53e1SZhaolei 72b11c53e1SZhaoleiconfig CONTEXT_SWITCH_TRACER 735f77a88bSTom Zanussi bool 745f77a88bSTom Zanussi 7585bac32cSSteven Rostedtconfig RING_BUFFER_ALLOW_SWAP 7685bac32cSSteven Rostedt bool 7785bac32cSSteven Rostedt help 7885bac32cSSteven Rostedt Allow the use of ring_buffer_swap_cpu. 7985bac32cSSteven Rostedt Adds a very slight overhead to tracing when enabled. 8085bac32cSSteven Rostedt 815e0a0939SSteven Rostedt# All tracer options should select GENERIC_TRACER. For those options that are 825e0a0939SSteven Rostedt# enabled by all tracers (context switch and event tracer) they select TRACING. 835e0a0939SSteven Rostedt# This allows those options to appear when no other tracer is selected. But the 845e0a0939SSteven Rostedt# options do not appear when something else selects it. We need the two options 855e0a0939SSteven Rostedt# GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the 8640892367SRandy Dunlap# hiding of the automatic options. 875e0a0939SSteven Rostedt 88bc0c38d1SSteven Rostedtconfig TRACING 89bc0c38d1SSteven Rostedt bool 90bc0c38d1SSteven Rostedt select DEBUG_FS 917a8e76a3SSteven Rostedt select RING_BUFFER 92c2c80529SAl Viro select STACKTRACE if STACKTRACE_SUPPORT 935f87f112SIngo Molnar select TRACEPOINTS 94f3384b28SSteven Rostedt select NOP_TRACER 95769b0441SFrederic Weisbecker select BINARY_PRINTF 965f77a88bSTom Zanussi select EVENT_TRACING 97bc0c38d1SSteven Rostedt 985e0a0939SSteven Rostedtconfig GENERIC_TRACER 995e0a0939SSteven Rostedt bool 1005e0a0939SSteven Rostedt select TRACING 1015e0a0939SSteven Rostedt 10240ada30fSIngo Molnar# 10340ada30fSIngo Molnar# Minimum requirements an architecture has to meet for us to 10440ada30fSIngo Molnar# be able to offer generic tracing facilities: 10540ada30fSIngo Molnar# 10640ada30fSIngo Molnarconfig TRACING_SUPPORT 10740ada30fSIngo Molnar bool 10845b95608SAnton Vorontsov # PPC32 has no irqflags tracing support, but it can use most of the 10945b95608SAnton Vorontsov # tracers anyway, they were tested to build and work. Note that new 11045b95608SAnton Vorontsov # exceptions to this list aren't welcomed, better implement the 11145b95608SAnton Vorontsov # irqflags tracing for your architecture. 11245b95608SAnton Vorontsov depends on TRACE_IRQFLAGS_SUPPORT || PPC32 11340ada30fSIngo Molnar depends on STACKTRACE_SUPPORT 114422d3c7aSKOSAKI Motohiro default y 11540ada30fSIngo Molnar 11640ada30fSIngo Molnarif TRACING_SUPPORT 11740ada30fSIngo Molnar 1184ed9f071SSteven Rostedtmenuconfig FTRACE 1194ed9f071SSteven Rostedt bool "Tracers" 12065b77242SSteven Rostedt default y if DEBUG_KERNEL 1214ed9f071SSteven Rostedt help 1224ed9f071SSteven Rostedt Enable the kernel tracing infrastructure. 1234ed9f071SSteven Rostedt 1244ed9f071SSteven Rostedtif FTRACE 12517d80fd0SPeter Zijlstra 126606576ceSSteven Rostedtconfig FUNCTION_TRACER 1271b29b018SSteven Rostedt bool "Kernel Function Tracer" 128606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 1291b29b018SSteven Rostedt select FRAME_POINTER 1304d7a077cSSteven Rostedt select KALLSYMS 1315e0a0939SSteven Rostedt select GENERIC_TRACER 13235e8e302SSteven Rostedt select CONTEXT_SWITCH_TRACER 1331b29b018SSteven Rostedt help 1341b29b018SSteven Rostedt Enable the kernel to trace every kernel function. This is done 1351b29b018SSteven Rostedt by using a compiler feature to insert a small, 5-byte No-Operation 13640892367SRandy Dunlap instruction at the beginning of every kernel function, which NOP 1371b29b018SSteven Rostedt sequence is then dynamically patched into a tracer call when 1381b29b018SSteven Rostedt tracing is enabled by the administrator. If it's runtime disabled 1391b29b018SSteven Rostedt (the bootup default), then the overhead of the instructions is very 1401b29b018SSteven Rostedt small and not measurable even in micro-benchmarks. 14135e8e302SSteven Rostedt 142fb52607aSFrederic Weisbeckerconfig FUNCTION_GRAPH_TRACER 143fb52607aSFrederic Weisbecker bool "Kernel Function Graph Tracer" 144fb52607aSFrederic Weisbecker depends on HAVE_FUNCTION_GRAPH_TRACER 14515e6cb36SFrederic Weisbecker depends on FUNCTION_TRACER 146eb4a0378SSteven Rostedt depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE 147764f3b95SIngo Molnar default y 14815e6cb36SFrederic Weisbecker help 149fb52607aSFrederic Weisbecker Enable the kernel to trace a function at both its return 150fb52607aSFrederic Weisbecker and its entry. 151692105b8SMatt LaPlante Its first purpose is to trace the duration of functions and 152692105b8SMatt LaPlante draw a call graph for each thread with some information like 153692105b8SMatt LaPlante the return value. This is done by setting the current return 154692105b8SMatt LaPlante address on the current task structure into a stack of calls. 15515e6cb36SFrederic Weisbecker 156bac429f0SSteven Rostedt 15781d68a96SSteven Rostedtconfig IRQSOFF_TRACER 15881d68a96SSteven Rostedt bool "Interrupts-off Latency Tracer" 15981d68a96SSteven Rostedt default n 16081d68a96SSteven Rostedt depends on TRACE_IRQFLAGS_SUPPORT 161592913ecSJohn Stultz depends on !ARCH_USES_GETTIMEOFFSET 16281d68a96SSteven Rostedt select TRACE_IRQFLAGS 1635e0a0939SSteven Rostedt select GENERIC_TRACER 16481d68a96SSteven Rostedt select TRACER_MAX_TRACE 16585bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 16681d68a96SSteven Rostedt help 16781d68a96SSteven Rostedt This option measures the time spent in irqs-off critical 16881d68a96SSteven Rostedt sections, with microsecond accuracy. 16981d68a96SSteven Rostedt 17081d68a96SSteven Rostedt The default measurement method is a maximum search, which is 17181d68a96SSteven Rostedt disabled by default and can be runtime (re-)started 17281d68a96SSteven Rostedt via: 17381d68a96SSteven Rostedt 174156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 17581d68a96SSteven Rostedt 17640892367SRandy Dunlap (Note that kernel size and overhead increase with this option 1776cd8a4bbSSteven Rostedt enabled. This option and the preempt-off timing option can be 1786cd8a4bbSSteven Rostedt used together or separately.) 1796cd8a4bbSSteven Rostedt 1806cd8a4bbSSteven Rostedtconfig PREEMPT_TRACER 1816cd8a4bbSSteven Rostedt bool "Preemption-off Latency Tracer" 1826cd8a4bbSSteven Rostedt default n 183592913ecSJohn Stultz depends on !ARCH_USES_GETTIMEOFFSET 1846cd8a4bbSSteven Rostedt depends on PREEMPT 1855e0a0939SSteven Rostedt select GENERIC_TRACER 1866cd8a4bbSSteven Rostedt select TRACER_MAX_TRACE 18785bac32cSSteven Rostedt select RING_BUFFER_ALLOW_SWAP 1886cd8a4bbSSteven Rostedt help 18940892367SRandy Dunlap This option measures the time spent in preemption-off critical 1906cd8a4bbSSteven Rostedt sections, with microsecond accuracy. 1916cd8a4bbSSteven Rostedt 1926cd8a4bbSSteven Rostedt The default measurement method is a maximum search, which is 1936cd8a4bbSSteven Rostedt disabled by default and can be runtime (re-)started 1946cd8a4bbSSteven Rostedt via: 1956cd8a4bbSSteven Rostedt 196156f5a78SGeunSik Lim echo 0 > /sys/kernel/debug/tracing/tracing_max_latency 1976cd8a4bbSSteven Rostedt 19840892367SRandy Dunlap (Note that kernel size and overhead increase with this option 1996cd8a4bbSSteven Rostedt enabled. This option and the irqs-off timing option can be 2006cd8a4bbSSteven Rostedt used together or separately.) 2016cd8a4bbSSteven Rostedt 202352ad25aSSteven Rostedtconfig SCHED_TRACER 203352ad25aSSteven Rostedt bool "Scheduling Latency Tracer" 2045e0a0939SSteven Rostedt select GENERIC_TRACER 205352ad25aSSteven Rostedt select CONTEXT_SWITCH_TRACER 206352ad25aSSteven Rostedt select TRACER_MAX_TRACE 207352ad25aSSteven Rostedt help 208352ad25aSSteven Rostedt This tracer tracks the latency of the highest priority task 209352ad25aSSteven Rostedt to be scheduled in, starting from the point it has woken up. 210352ad25aSSteven Rostedt 211897f17a6SSteven Rostedtconfig ENABLE_DEFAULT_TRACERS 212897f17a6SSteven Rostedt bool "Trace process context switches and events" 2135e0a0939SSteven Rostedt depends on !GENERIC_TRACER 214b77e38aaSSteven Rostedt select TRACING 215b77e38aaSSteven Rostedt help 21640892367SRandy Dunlap This tracer hooks to various trace points in the kernel, 217b77e38aaSSteven Rostedt allowing the user to pick and choose which trace point they 218897f17a6SSteven Rostedt want to trace. It also includes the sched_switch tracer plugin. 219a7abe97fSSteven Rostedt 220ee08c6ecSFrederic Weisbeckerconfig FTRACE_SYSCALLS 221ee08c6ecSFrederic Weisbecker bool "Trace syscalls" 22266700001SJosh Stone depends on HAVE_SYSCALL_TRACEPOINTS 2235e0a0939SSteven Rostedt select GENERIC_TRACER 2240ea1c415SFrederic Weisbecker select KALLSYMS 225ee08c6ecSFrederic Weisbecker help 226ee08c6ecSFrederic Weisbecker Basic tracer to catch the syscall entry and exit events. 227ee08c6ecSFrederic Weisbecker 2282ed84eebSSteven Rostedtconfig TRACE_BRANCH_PROFILING 2299ae5b879SSteven Rostedt bool 2305e0a0939SSteven Rostedt select GENERIC_TRACER 2319ae5b879SSteven Rostedt 2329ae5b879SSteven Rostedtchoice 2339ae5b879SSteven Rostedt prompt "Branch Profiling" 2349ae5b879SSteven Rostedt default BRANCH_PROFILE_NONE 2359ae5b879SSteven Rostedt help 2369ae5b879SSteven Rostedt The branch profiling is a software profiler. It will add hooks 2379ae5b879SSteven Rostedt into the C conditionals to test which path a branch takes. 2389ae5b879SSteven Rostedt 2399ae5b879SSteven Rostedt The likely/unlikely profiler only looks at the conditions that 2409ae5b879SSteven Rostedt are annotated with a likely or unlikely macro. 2419ae5b879SSteven Rostedt 24240892367SRandy Dunlap The "all branch" profiler will profile every if-statement in the 2439ae5b879SSteven Rostedt kernel. This profiler will also enable the likely/unlikely 24440892367SRandy Dunlap profiler. 2459ae5b879SSteven Rostedt 24640892367SRandy Dunlap Either of the above profilers adds a bit of overhead to the system. 24740892367SRandy Dunlap If unsure, choose "No branch profiling". 2489ae5b879SSteven Rostedt 2499ae5b879SSteven Rostedtconfig BRANCH_PROFILE_NONE 2509ae5b879SSteven Rostedt bool "No branch profiling" 2519ae5b879SSteven Rostedt help 2529ae5b879SSteven Rostedt No branch profiling. Branch profiling adds a bit of overhead. 2539ae5b879SSteven Rostedt Only enable it if you want to analyse the branching behavior. 2549ae5b879SSteven Rostedt Otherwise keep it disabled. 2559ae5b879SSteven Rostedt 2569ae5b879SSteven Rostedtconfig PROFILE_ANNOTATED_BRANCHES 2579ae5b879SSteven Rostedt bool "Trace likely/unlikely profiler" 2589ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 2591f0d69a9SSteven Rostedt help 2601f0d69a9SSteven Rostedt This tracer profiles all the the likely and unlikely macros 2611f0d69a9SSteven Rostedt in the kernel. It will display the results in: 2621f0d69a9SSteven Rostedt 263156f5a78SGeunSik Lim /sys/kernel/debug/tracing/profile_annotated_branch 2641f0d69a9SSteven Rostedt 26540892367SRandy Dunlap Note: this will add a significant overhead; only turn this 2661f0d69a9SSteven Rostedt on if you need to profile the system's use of these macros. 2671f0d69a9SSteven Rostedt 2682bcd521aSSteven Rostedtconfig PROFILE_ALL_BRANCHES 2692bcd521aSSteven Rostedt bool "Profile all if conditionals" 2709ae5b879SSteven Rostedt select TRACE_BRANCH_PROFILING 2712bcd521aSSteven Rostedt help 2722bcd521aSSteven Rostedt This tracer profiles all branch conditions. Every if () 2732bcd521aSSteven Rostedt taken in the kernel is recorded whether it hit or miss. 2742bcd521aSSteven Rostedt The results will be displayed in: 2752bcd521aSSteven Rostedt 276156f5a78SGeunSik Lim /sys/kernel/debug/tracing/profile_branch 2772bcd521aSSteven Rostedt 2789ae5b879SSteven Rostedt This option also enables the likely/unlikely profiler. 2799ae5b879SSteven Rostedt 2802bcd521aSSteven Rostedt This configuration, when enabled, will impose a great overhead 2812bcd521aSSteven Rostedt on the system. This should only be enabled when the system 28240892367SRandy Dunlap is to be analyzed in much detail. 2839ae5b879SSteven Rostedtendchoice 2842bcd521aSSteven Rostedt 2852ed84eebSSteven Rostedtconfig TRACING_BRANCHES 28652f232cbSSteven Rostedt bool 28752f232cbSSteven Rostedt help 28852f232cbSSteven Rostedt Selected by tracers that will trace the likely and unlikely 28952f232cbSSteven Rostedt conditions. This prevents the tracers themselves from being 29052f232cbSSteven Rostedt profiled. Profiling the tracing infrastructure can only happen 29152f232cbSSteven Rostedt when the likelys and unlikelys are not being traced. 29252f232cbSSteven Rostedt 2932ed84eebSSteven Rostedtconfig BRANCH_TRACER 29452f232cbSSteven Rostedt bool "Trace likely/unlikely instances" 2952ed84eebSSteven Rostedt depends on TRACE_BRANCH_PROFILING 2962ed84eebSSteven Rostedt select TRACING_BRANCHES 29752f232cbSSteven Rostedt help 29852f232cbSSteven Rostedt This traces the events of likely and unlikely condition 29952f232cbSSteven Rostedt calls in the kernel. The difference between this and the 30052f232cbSSteven Rostedt "Trace likely/unlikely profiler" is that this is not a 30152f232cbSSteven Rostedt histogram of the callers, but actually places the calling 30252f232cbSSteven Rostedt events into a running trace buffer to see when and where the 30352f232cbSSteven Rostedt events happened, as well as their results. 30452f232cbSSteven Rostedt 30552f232cbSSteven Rostedt Say N if unsure. 30652f232cbSSteven Rostedt 307e5a81b62SSteven Rostedtconfig STACK_TRACER 308e5a81b62SSteven Rostedt bool "Trace max stack" 309606576ceSSteven Rostedt depends on HAVE_FUNCTION_TRACER 310606576ceSSteven Rostedt select FUNCTION_TRACER 311e5a81b62SSteven Rostedt select STACKTRACE 3124d7a077cSSteven Rostedt select KALLSYMS 313e5a81b62SSteven Rostedt help 3144519d9e5SIngo Molnar This special tracer records the maximum stack footprint of the 315156f5a78SGeunSik Lim kernel and displays it in /sys/kernel/debug/tracing/stack_trace. 3164519d9e5SIngo Molnar 3174519d9e5SIngo Molnar This tracer works by hooking into every function call that the 3184519d9e5SIngo Molnar kernel executes, and keeping a maximum stack depth value and 319f38f1d2aSSteven Rostedt stack-trace saved. If this is configured with DYNAMIC_FTRACE 320f38f1d2aSSteven Rostedt then it will not have any overhead while the stack tracer 321f38f1d2aSSteven Rostedt is disabled. 322f38f1d2aSSteven Rostedt 323f38f1d2aSSteven Rostedt To enable the stack tracer on bootup, pass in 'stacktrace' 324f38f1d2aSSteven Rostedt on the kernel command line. 325f38f1d2aSSteven Rostedt 326f38f1d2aSSteven Rostedt The stack tracer can also be enabled or disabled via the 327f38f1d2aSSteven Rostedt sysctl kernel.stack_tracer_enabled 3284519d9e5SIngo Molnar 3294519d9e5SIngo Molnar Say N if unsure. 330e5a81b62SSteven Rostedt 3312db270a8SFrederic Weisbeckerconfig BLK_DEV_IO_TRACE 33240892367SRandy Dunlap bool "Support for tracing block IO actions" 3332db270a8SFrederic Weisbecker depends on SYSFS 3341dfba05dSIngo Molnar depends on BLOCK 3352db270a8SFrederic Weisbecker select RELAY 3362db270a8SFrederic Weisbecker select DEBUG_FS 3372db270a8SFrederic Weisbecker select TRACEPOINTS 3385e0a0939SSteven Rostedt select GENERIC_TRACER 3392db270a8SFrederic Weisbecker select STACKTRACE 3402db270a8SFrederic Weisbecker help 3412db270a8SFrederic Weisbecker Say Y here if you want to be able to trace the block layer actions 3422db270a8SFrederic Weisbecker on a given queue. Tracing allows you to see any traffic happening 3432db270a8SFrederic Weisbecker on a block device queue. For more information (and the userspace 3442db270a8SFrederic Weisbecker support tools needed), fetch the blktrace tools from: 3452db270a8SFrederic Weisbecker 3462db270a8SFrederic Weisbecker git://git.kernel.dk/blktrace.git 3472db270a8SFrederic Weisbecker 3482db270a8SFrederic Weisbecker Tracing also is possible using the ftrace interface, e.g.: 3492db270a8SFrederic Weisbecker 3502db270a8SFrederic Weisbecker echo 1 > /sys/block/sda/sda1/trace/enable 3512db270a8SFrederic Weisbecker echo blk > /sys/kernel/debug/tracing/current_tracer 3522db270a8SFrederic Weisbecker cat /sys/kernel/debug/tracing/trace_pipe 3532db270a8SFrederic Weisbecker 3542db270a8SFrederic Weisbecker If unsure, say N. 35536994e58SFrederic Weisbecker 35677b44d1bSMasami Hiramatsuconfig KPROBE_EVENT 357413d37d1SMasami Hiramatsu depends on KPROBES 358f850c30cSHeiko Carstens depends on HAVE_REGS_AND_STACK_ACCESS_API 35977b44d1bSMasami Hiramatsu bool "Enable kprobes-based dynamic events" 360413d37d1SMasami Hiramatsu select TRACING 36177b44d1bSMasami Hiramatsu default y 362413d37d1SMasami Hiramatsu help 36340892367SRandy Dunlap This allows the user to add tracing events (similar to tracepoints) 36440892367SRandy Dunlap on the fly via the ftrace interface. See 36540892367SRandy Dunlap Documentation/trace/kprobetrace.txt for more details. 36677b44d1bSMasami Hiramatsu 36777b44d1bSMasami Hiramatsu Those events can be inserted wherever kprobes can probe, and record 36877b44d1bSMasami Hiramatsu various register and memory values. 36977b44d1bSMasami Hiramatsu 37040892367SRandy Dunlap This option is also required by perf-probe subcommand of perf tools. 37140892367SRandy Dunlap If you want to use perf tools, this option is strongly recommended. 372413d37d1SMasami Hiramatsu 3733d083395SSteven Rostedtconfig DYNAMIC_FTRACE 3743d083395SSteven Rostedt bool "enable/disable ftrace tracepoints dynamically" 375606576ceSSteven Rostedt depends on FUNCTION_TRACER 376677aa9f7SSteven Rostedt depends on HAVE_DYNAMIC_FTRACE 3773d083395SSteven Rostedt default y 3783d083395SSteven Rostedt help 3793d083395SSteven Rostedt This option will modify all the calls to ftrace dynamically 38040892367SRandy Dunlap (will patch them out of the binary image and replace them 3813d083395SSteven Rostedt with a No-Op instruction) as they are called. A table is 3823d083395SSteven Rostedt created to dynamically enable them again. 3833d083395SSteven Rostedt 38440892367SRandy Dunlap This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but 38540892367SRandy Dunlap otherwise has native performance as long as no tracing is active. 3863d083395SSteven Rostedt 3873d083395SSteven Rostedt The changes to the code are done by a kernel thread that 3883d083395SSteven Rostedt wakes up once a second and checks to see if any ftrace calls 3893d083395SSteven Rostedt were made. If so, it runs stop_machine (stops all CPUS) 3903d083395SSteven Rostedt and modifies the code to jump over the call to ftrace. 39160a11774SSteven Rostedt 392bac429f0SSteven Rostedtconfig FUNCTION_PROFILER 393bac429f0SSteven Rostedt bool "Kernel function profiler" 394493762fcSSteven Rostedt depends on FUNCTION_TRACER 395bac429f0SSteven Rostedt default n 396bac429f0SSteven Rostedt help 397493762fcSSteven Rostedt This option enables the kernel function profiler. A file is created 398493762fcSSteven Rostedt in debugfs called function_profile_enabled which defaults to zero. 399bac429f0SSteven Rostedt When a 1 is echoed into this file profiling begins, and when a 40040892367SRandy Dunlap zero is entered, profiling stops. A "functions" file is created in 40140892367SRandy Dunlap the trace_stats directory; this file shows the list of functions that 402bac429f0SSteven Rostedt have been hit and their counters. 403bac429f0SSteven Rostedt 40440892367SRandy Dunlap If in doubt, say N. 405bac429f0SSteven Rostedt 4068da3821bSSteven Rostedtconfig FTRACE_MCOUNT_RECORD 4078da3821bSSteven Rostedt def_bool y 4088da3821bSSteven Rostedt depends on DYNAMIC_FTRACE 4098da3821bSSteven Rostedt depends on HAVE_FTRACE_MCOUNT_RECORD 4108da3821bSSteven Rostedt 41160a11774SSteven Rostedtconfig FTRACE_SELFTEST 41260a11774SSteven Rostedt bool 41360a11774SSteven Rostedt 41460a11774SSteven Rostedtconfig FTRACE_STARTUP_TEST 41560a11774SSteven Rostedt bool "Perform a startup test on ftrace" 4165e0a0939SSteven Rostedt depends on GENERIC_TRACER 41760a11774SSteven Rostedt select FTRACE_SELFTEST 41860a11774SSteven Rostedt help 41960a11774SSteven Rostedt This option performs a series of startup tests on ftrace. On bootup 42060a11774SSteven Rostedt a series of tests are made to verify that the tracer is 42160a11774SSteven Rostedt functioning properly. It will do tests on all the configured 42260a11774SSteven Rostedt tracers of ftrace. 42317d80fd0SPeter Zijlstra 4241f5a6b45SSteven Rostedtconfig EVENT_TRACE_TEST_SYSCALLS 4251f5a6b45SSteven Rostedt bool "Run selftest on syscall events" 4261f5a6b45SSteven Rostedt depends on FTRACE_STARTUP_TEST 4271f5a6b45SSteven Rostedt help 4281f5a6b45SSteven Rostedt This option will also enable testing every syscall event. 4291f5a6b45SSteven Rostedt It only enables the event and disables it and runs various loads 4301f5a6b45SSteven Rostedt with the event enabled. This adds a bit more time for kernel boot 4311f5a6b45SSteven Rostedt up since it runs this on every system call defined. 4321f5a6b45SSteven Rostedt 4331f5a6b45SSteven Rostedt TBD - enable a way to actually call the syscalls as we test their 4341f5a6b45SSteven Rostedt events 4351f5a6b45SSteven Rostedt 436fe6f90e5SPekka Paalanenconfig MMIOTRACE 437fe6f90e5SPekka Paalanen bool "Memory mapped IO tracing" 43840ada30fSIngo Molnar depends on HAVE_MMIOTRACE_SUPPORT && PCI 4395e0a0939SSteven Rostedt select GENERIC_TRACER 440fe6f90e5SPekka Paalanen help 441fe6f90e5SPekka Paalanen Mmiotrace traces Memory Mapped I/O access and is meant for 442fe6f90e5SPekka Paalanen debugging and reverse engineering. It is called from the ioremap 443fe6f90e5SPekka Paalanen implementation and works via page faults. Tracing is disabled by 444fe6f90e5SPekka Paalanen default and can be enabled at run-time. 445fe6f90e5SPekka Paalanen 4464d1f4372SLi Zefan See Documentation/trace/mmiotrace.txt. 447fe6f90e5SPekka Paalanen If you are not helping to develop drivers, say N. 448fe6f90e5SPekka Paalanen 449fe6f90e5SPekka Paalanenconfig MMIOTRACE_TEST 450fe6f90e5SPekka Paalanen tristate "Test module for mmiotrace" 451fe6f90e5SPekka Paalanen depends on MMIOTRACE && m 452fe6f90e5SPekka Paalanen help 453fe6f90e5SPekka Paalanen This is a dumb module for testing mmiotrace. It is very dangerous 454fe6f90e5SPekka Paalanen as it will write garbage to IO memory starting at a given address. 455fe6f90e5SPekka Paalanen However, it should be safe to use on e.g. unused portion of VRAM. 456fe6f90e5SPekka Paalanen 457fe6f90e5SPekka Paalanen Say N, unless you absolutely know what you are doing. 458fe6f90e5SPekka Paalanen 4595092dbc9SSteven Rostedtconfig RING_BUFFER_BENCHMARK 4605092dbc9SSteven Rostedt tristate "Ring buffer benchmark stress tester" 4615092dbc9SSteven Rostedt depends on RING_BUFFER 4625092dbc9SSteven Rostedt help 4635092dbc9SSteven Rostedt This option creates a test to stress the ring buffer and benchmark it. 46440892367SRandy Dunlap It creates its own ring buffer such that it will not interfere with 4655092dbc9SSteven Rostedt any other users of the ring buffer (such as ftrace). It then creates 4665092dbc9SSteven Rostedt a producer and consumer that will run for 10 seconds and sleep for 4675092dbc9SSteven Rostedt 10 seconds. Each interval it will print out the number of events 4685092dbc9SSteven Rostedt it recorded and give a rough estimate of how long each iteration took. 4695092dbc9SSteven Rostedt 4705092dbc9SSteven Rostedt It does not disable interrupts or raise its priority, so it may be 4715092dbc9SSteven Rostedt affected by processes that are running. 4725092dbc9SSteven Rostedt 47340892367SRandy Dunlap If unsure, say N. 4745092dbc9SSteven Rostedt 4754ed9f071SSteven Rostedtendif # FTRACE 47640ada30fSIngo Molnar 47740ada30fSIngo Molnarendif # TRACING_SUPPORT 47840ada30fSIngo Molnar 479