Navigation: Linux Kernel Driver DataBase - web LKDDB: Main index - D index

CONFIG_DYNAMIC_FTRACE: enable/disable function tracing dynamically

General informations

The Linux kernel configuration item CONFIG_DYNAMIC_FTRACE has multiple definitions:

enable/disable function tracing dynamically found in kernel/trace/Kconfig

The configuration item CONFIG_DYNAMIC_FTRACE:

Help text

This option will modify all the calls to function tracing dynamically (will patch them out of the binary image and replace them with a No-Op instruction) on boot up. During compile time, a table is made of all the locations that ftrace can function trace, and this table is linked into the kernel image. When this is enabled, functions can be individually enabled, and the functions not enabled will not affect performance of the system.

See the files in /sys/kernel/tracing: available_filter_functions set_ftrace_filter set_ftrace_notrace

This way a FUNCTION_TRACER kernel is slightly larger, but otherwise has native performance as long as no tracing is active.

enable/disable ftrace tracepoints dynamically found in kernel/trace/Kconfig

The configuration item CONFIG_DYNAMIC_FTRACE:

Help text

This option will modify all the calls to ftrace dynamically (will patch them out of the binary image and replace them with a No-Op instruction) as they are called. A table is created to dynamically enable them again.

This way a FUNCTION_TRACER 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.

Hardware

LKDDb

Raw data from LKDDb:

Sources

This page is automaticly generated with free (libre, open) software lkddb(see lkddb-sources).

The data is retrived from:

Automatic links from Google (and ads)

Custom Search

Popular queries:

Navigation: Linux Kernel Driver DataBase - web LKDDB: main index - D index

Automatically generated (in year 2024). See also LKDDb sources on GitLab