Kconfig (5661706efa200252d0e9fea02421b0a5857808c3) Kconfig (2455f0e124d317dd08d337a7550a78a224d4ba41)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Architectures that offer an FUNCTION_TRACER implementation should
4# select HAVE_FUNCTION_TRACER:
5#
6
7config USER_STACKTRACE_SUPPORT
8 bool

--- 225 unchanged lines hidden (view full) ---

234 dynamically (will patch them out of the binary image and
235 replace them with a No-Op instruction) on boot up. During
236 compile time, a table is made of all the locations that ftrace
237 can function trace, and this table is linked into the kernel
238 image. When this is enabled, functions can be individually
239 enabled, and the functions not enabled will not affect
240 performance of the system.
241
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Architectures that offer an FUNCTION_TRACER implementation should
4# select HAVE_FUNCTION_TRACER:
5#
6
7config USER_STACKTRACE_SUPPORT
8 bool

--- 225 unchanged lines hidden (view full) ---

234 dynamically (will patch them out of the binary image and
235 replace them with a No-Op instruction) on boot up. During
236 compile time, a table is made of all the locations that ftrace
237 can function trace, and this table is linked into the kernel
238 image. When this is enabled, functions can be individually
239 enabled, and the functions not enabled will not affect
240 performance of the system.
241
242 See the files in /sys/kernel/debug/tracing:
242 See the files in /sys/kernel/tracing:
243 available_filter_functions
244 set_ftrace_filter
245 set_ftrace_notrace
246
247 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but
248 otherwise has native performance as long as no tracing is active.
249
250config DYNAMIC_FTRACE_WITH_REGS

--- 43 unchanged lines hidden (view full) ---

294config STACK_TRACER
295 bool "Trace max stack"
296 depends on HAVE_FUNCTION_TRACER
297 select FUNCTION_TRACER
298 select STACKTRACE
299 select KALLSYMS
300 help
301 This special tracer records the maximum stack footprint of the
243 available_filter_functions
244 set_ftrace_filter
245 set_ftrace_notrace
246
247 This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but
248 otherwise has native performance as long as no tracing is active.
249
250config DYNAMIC_FTRACE_WITH_REGS

--- 43 unchanged lines hidden (view full) ---

294config STACK_TRACER
295 bool "Trace max stack"
296 depends on HAVE_FUNCTION_TRACER
297 select FUNCTION_TRACER
298 select STACKTRACE
299 select KALLSYMS
300 help
301 This special tracer records the maximum stack footprint of the
302 kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
302 kernel and displays it in /sys/kernel/tracing/stack_trace.
303
304 This tracer works by hooking into every function call that the
305 kernel executes, and keeping a maximum stack depth value and
306 stack-trace saved. If this is configured with DYNAMIC_FTRACE
307 then it will not have any overhead while the stack tracer
308 is disabled.
309
310 To enable the stack tracer on bootup, pass in 'stacktrace'

--- 23 unchanged lines hidden (view full) ---

334 help
335 This option measures the time spent in irqs-off critical
336 sections, with microsecond accuracy.
337
338 The default measurement method is a maximum search, which is
339 disabled by default and can be runtime (re-)started
340 via:
341
303
304 This tracer works by hooking into every function call that the
305 kernel executes, and keeping a maximum stack depth value and
306 stack-trace saved. If this is configured with DYNAMIC_FTRACE
307 then it will not have any overhead while the stack tracer
308 is disabled.
309
310 To enable the stack tracer on bootup, pass in 'stacktrace'

--- 23 unchanged lines hidden (view full) ---

334 help
335 This option measures the time spent in irqs-off critical
336 sections, with microsecond accuracy.
337
338 The default measurement method is a maximum search, which is
339 disabled by default and can be runtime (re-)started
340 via:
341
342 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
342 echo 0 > /sys/kernel/tracing/tracing_max_latency
343
344 (Note that kernel size and overhead increase with this option
345 enabled. This option and the preempt-off timing option can be
346 used together or separately.)
347
348config PREEMPT_TRACER
349 bool "Preemption-off Latency Tracer"
350 default n

--- 7 unchanged lines hidden (view full) ---

358 help
359 This option measures the time spent in preemption-off critical
360 sections, with microsecond accuracy.
361
362 The default measurement method is a maximum search, which is
363 disabled by default and can be runtime (re-)started
364 via:
365
343
344 (Note that kernel size and overhead increase with this option
345 enabled. This option and the preempt-off timing option can be
346 used together or separately.)
347
348config PREEMPT_TRACER
349 bool "Preemption-off Latency Tracer"
350 default n

--- 7 unchanged lines hidden (view full) ---

358 help
359 This option measures the time spent in preemption-off critical
360 sections, with microsecond accuracy.
361
362 The default measurement method is a maximum search, which is
363 disabled by default and can be runtime (re-)started
364 via:
365
366 echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
366 echo 0 > /sys/kernel/tracing/tracing_max_latency
367
368 (Note that kernel size and overhead increase with this option
369 enabled. This option and the irqs-off timing option can be
370 used together or separately.)
371
372config SCHED_TRACER
373 bool "Scheduling Latency Tracer"
374 select GENERIC_TRACER

--- 135 unchanged lines hidden (view full) ---

510
511config TRACER_SNAPSHOT
512 bool "Create a snapshot trace buffer"
513 select TRACER_MAX_TRACE
514 help
515 Allow tracing users to take snapshot of the current buffer using the
516 ftrace interface, e.g.:
517
367
368 (Note that kernel size and overhead increase with this option
369 enabled. This option and the irqs-off timing option can be
370 used together or separately.)
371
372config SCHED_TRACER
373 bool "Scheduling Latency Tracer"
374 select GENERIC_TRACER

--- 135 unchanged lines hidden (view full) ---

510
511config TRACER_SNAPSHOT
512 bool "Create a snapshot trace buffer"
513 select TRACER_MAX_TRACE
514 help
515 Allow tracing users to take snapshot of the current buffer using the
516 ftrace interface, e.g.:
517
518 echo 1 > /sys/kernel/debug/tracing/snapshot
518 echo 1 > /sys/kernel/tracing/snapshot
519 cat snapshot
520
521config TRACER_SNAPSHOT_PER_CPU_SWAP
522 bool "Allow snapshot to swap per CPU"
523 depends on TRACER_SNAPSHOT
524 select RING_BUFFER_ALLOW_SWAP
525 help
526 Allow doing a snapshot of a single CPU buffer instead of a
527 full swap (all buffers). If this is set, then the following is
528 allowed:
529
519 cat snapshot
520
521config TRACER_SNAPSHOT_PER_CPU_SWAP
522 bool "Allow snapshot to swap per CPU"
523 depends on TRACER_SNAPSHOT
524 select RING_BUFFER_ALLOW_SWAP
525 help
526 Allow doing a snapshot of a single CPU buffer instead of a
527 full swap (all buffers). If this is set, then the following is
528 allowed:
529
530 echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot
530 echo 1 > /sys/kernel/tracing/per_cpu/cpu2/snapshot
531
532 After which, only the tracing buffer for CPU 2 was swapped with
533 the main tracing buffer, and the other CPU buffers remain the same.
534
535 When this is enabled, this adds a little more overhead to the
536 trace recording, as it needs to add some checks to synchronize
537 recording with swaps. But this does not affect the performance
538 of the overall system. This is enabled by default when the preempt

--- 30 unchanged lines hidden (view full) ---

569
570config PROFILE_ANNOTATED_BRANCHES
571 bool "Trace likely/unlikely profiler"
572 select TRACE_BRANCH_PROFILING
573 help
574 This tracer profiles all likely and unlikely macros
575 in the kernel. It will display the results in:
576
531
532 After which, only the tracing buffer for CPU 2 was swapped with
533 the main tracing buffer, and the other CPU buffers remain the same.
534
535 When this is enabled, this adds a little more overhead to the
536 trace recording, as it needs to add some checks to synchronize
537 recording with swaps. But this does not affect the performance
538 of the overall system. This is enabled by default when the preempt

--- 30 unchanged lines hidden (view full) ---

569
570config PROFILE_ANNOTATED_BRANCHES
571 bool "Trace likely/unlikely profiler"
572 select TRACE_BRANCH_PROFILING
573 help
574 This tracer profiles all likely and unlikely macros
575 in the kernel. It will display the results in:
576
577 /sys/kernel/debug/tracing/trace_stat/branch_annotated
577 /sys/kernel/tracing/trace_stat/branch_annotated
578
579 Note: this will add a significant overhead; only turn this
580 on if you need to profile the system's use of these macros.
581
582config PROFILE_ALL_BRANCHES
583 bool "Profile all if conditionals" if !FORTIFY_SOURCE
584 select TRACE_BRANCH_PROFILING
585 help
586 This tracer profiles all branch conditions. Every if ()
587 taken in the kernel is recorded whether it hit or miss.
588 The results will be displayed in:
589
578
579 Note: this will add a significant overhead; only turn this
580 on if you need to profile the system's use of these macros.
581
582config PROFILE_ALL_BRANCHES
583 bool "Profile all if conditionals" if !FORTIFY_SOURCE
584 select TRACE_BRANCH_PROFILING
585 help
586 This tracer profiles all branch conditions. Every if ()
587 taken in the kernel is recorded whether it hit or miss.
588 The results will be displayed in:
589
590 /sys/kernel/debug/tracing/trace_stat/branch_all
590 /sys/kernel/tracing/trace_stat/branch_all
591
592 This option also enables the likely/unlikely profiler.
593
594 This configuration, when enabled, will impose a great overhead
595 on the system. This should only be enabled when the system
596 is to be analyzed in much detail.
597endchoice
598

--- 34 unchanged lines hidden (view full) ---

633 on a block device queue. For more information (and the userspace
634 support tools needed), fetch the blktrace tools from:
635
636 git://git.kernel.dk/blktrace.git
637
638 Tracing also is possible using the ftrace interface, e.g.:
639
640 echo 1 > /sys/block/sda/sda1/trace/enable
591
592 This option also enables the likely/unlikely profiler.
593
594 This configuration, when enabled, will impose a great overhead
595 on the system. This should only be enabled when the system
596 is to be analyzed in much detail.
597endchoice
598

--- 34 unchanged lines hidden (view full) ---

633 on a block device queue. For more information (and the userspace
634 support tools needed), fetch the blktrace tools from:
635
636 git://git.kernel.dk/blktrace.git
637
638 Tracing also is possible using the ftrace interface, e.g.:
639
640 echo 1 > /sys/block/sda/sda1/trace/enable
641 echo blk > /sys/kernel/debug/tracing/current_tracer
642 cat /sys/kernel/debug/tracing/trace_pipe
641 echo blk > /sys/kernel/tracing/current_tracer
642 cat /sys/kernel/tracing/trace_pipe
643
644 If unsure, say N.
645
646config KPROBE_EVENTS
647 depends on KPROBES
648 depends on HAVE_REGS_AND_STACK_ACCESS_API
649 bool "Enable kprobes-based dynamic events"
650 select TRACING

--- 476 unchanged lines hidden ---
643
644 If unsure, say N.
645
646config KPROBE_EVENTS
647 depends on KPROBES
648 depends on HAVE_REGS_AND_STACK_ACCESS_API
649 bool "Enable kprobes-based dynamic events"
650 select TRACING

--- 476 unchanged lines hidden ---