diff options
author | Steven Rostedt <srostedt@redhat.com> | 2013-02-27 21:48:09 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-02-27 21:58:01 -0500 |
commit | db05021d49a994ee40a9735d9c3cb0060c9babb8 (patch) | |
tree | 8146f2c71be7a05ef1615a431adecd9ec46d3e2f /kernel | |
parent | ff1fb5f6b4925a536ffb8171e5f2dbd01ccfeb97 (diff) |
ftrace: Update the kconfig for DYNAMIC_FTRACE
The prompt to enable DYNAMIC_FTRACE (the ability to nop and
enable function tracing at run time) had a confusing statement:
"enable/disable ftrace tracepoints dynamically"
This was written before tracepoints were added to the kernel,
but now that tracepoints have been added, this is very confusing
and has confused people enough to give wrong information during
presentations.
Not only that, I looked at the help text, and it still references
that dreaded daemon that use to wake up once a second to update
the nop locations and brick NICs, that hasn't been around for over
five years.
Time to bring the text up to the current decade.
Cc: stable@vger.kernel.org
Reported-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/Kconfig | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 36567564e221..b516a8e19d51 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -429,24 +429,28 @@ config PROBE_EVENTS | |||
429 | def_bool n | 429 | def_bool n |
430 | 430 | ||
431 | config DYNAMIC_FTRACE | 431 | config DYNAMIC_FTRACE |
432 | bool "enable/disable ftrace tracepoints dynamically" | 432 | bool "enable/disable function tracing dynamically" |
433 | depends on FUNCTION_TRACER | 433 | depends on FUNCTION_TRACER |
434 | depends on HAVE_DYNAMIC_FTRACE | 434 | depends on HAVE_DYNAMIC_FTRACE |
435 | default y | 435 | default y |
436 | help | 436 | help |
437 | This option will modify all the calls to ftrace dynamically | 437 | This option will modify all the calls to function tracing |
438 | (will patch them out of the binary image and replace them | 438 | dynamically (will patch them out of the binary image and |
439 | with a No-Op instruction) as they are called. A table is | 439 | replace them with a No-Op instruction) on boot up. During |
440 | created to dynamically enable them again. | 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 | ||
441 | 450 | ||
442 | This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but | 451 | This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but |
443 | otherwise has native performance as long as no tracing is active. | 452 | otherwise has native performance as long as no tracing is active. |
444 | 453 | ||
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 | |||
450 | config DYNAMIC_FTRACE_WITH_REGS | 454 | config DYNAMIC_FTRACE_WITH_REGS |
451 | def_bool y | 455 | def_bool y |
452 | depends on DYNAMIC_FTRACE | 456 | depends on DYNAMIC_FTRACE |