Skip to content

Commit a335358

Browse files
author
Ingo Molnar
committed
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
Pull an ftrace Kconfig help text fix from Steve Rostedt. Signed-off-by: Ingo Molnar <[email protected]>
2 parents ff1fb5f + db05021 commit a335358

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

kernel/trace/Kconfig

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -429,24 +429,28 @@ config PROBE_EVENTS
429429
def_bool n
430430

431431
config DYNAMIC_FTRACE
432-
bool "enable/disable ftrace tracepoints dynamically"
432+
bool "enable/disable function tracing dynamically"
433433
depends on FUNCTION_TRACER
434434
depends on HAVE_DYNAMIC_FTRACE
435435
default y
436436
help
437-
This option will modify all the calls to ftrace dynamically
438-
(will patch them out of the binary image and replace them
439-
with a No-Op instruction) as they are called. A table is
440-
created to dynamically enable them again.
437+
This option will modify all the calls to function tracing
438+
dynamically (will patch them out of the binary image and
439+
replace them with a No-Op instruction) on boot up. During
440+
compile time, a table is made of all the locations that ftrace
441+
can function trace, and this table is linked into the kernel
442+
image. When this is enabled, functions can be individually
443+
enabled, and the functions not enabled will not affect
444+
performance of the system.
445+
446+
See the files in /sys/kernel/debug/tracing:
447+
available_filter_functions
448+
set_ftrace_filter
449+
set_ftrace_notrace
441450

442451
This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but
443452
otherwise has native performance as long as no tracing is active.
444453

445-
The changes to the code are done by a kernel thread that
446-
wakes up once a second and checks to see if any ftrace calls
447-
were made. If so, it runs stop_machine (stops all CPUS)
448-
and modifies the code to jump over the call to ftrace.
449-
450454
config DYNAMIC_FTRACE_WITH_REGS
451455
def_bool y
452456
depends on DYNAMIC_FTRACE

0 commit comments

Comments
 (0)