enable/disable ftrace tracepoints dynamically (BROKEN)
modulename: mcount-dyn.ko
and/orftrace.ko
configname: CONFIG_DYNAMIC_FTRACE
Linux Kernel Configuration
└─>enable/disable ftrace tracepoints dynamically (BROKEN)
In linux kernel since version 2.6.27 (release Date: 2008-10-09)
This option will modify all the calls to ftrace dynamically
(will patch them out of the binary image and replaces them
with a No-Op instruction) as they are called. A table is
created to dynamically enable them again.
This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
has native performance as long as no tracing is active.
The changes to the code are done by a kernel thread that
wakes up once a second and checks to see if any ftrace calls
were made. If so, it runs stop_machine (stops all CPUS)
and modifies the code to jump over the call to ftrace.
(will patch them out of the binary image and replaces them
with a No-Op instruction) as they are called. A table is
created to dynamically enable them again.
This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
has native performance as long as no tracing is active.
The changes to the code are done by a kernel thread that
wakes up once a second and checks to see if any ftrace calls
were made. If so, it runs stop_machine (stops all CPUS)
and modifies the code to jump over the call to ftrace.
source code:
depends
CONFIG_BROKENCONFIG_FTRACE
CONFIG_HAVE_DYNAMIC_FTRACE or CONFIG_FUNCTION_TRACER or CONFIG_TRACING_SUPPORT