CONFIG_FTRACECONFIG_HAVE_FUNCTION_TRACERCONFIG_HAVE_FUNCTION_GRAPH_TRACERCONFIG_HAVE_DYNAMIC_FTRACECONFIG_HAVE_FTRACE_MCOUNT_RECORD
Dump ftrace information to the kmsg buffer
To dump the ftrace information into the kmsg buffer anytime from the source code, call theftrace_dump(DUMP_ALL) function.
- To increase the buffer size of the ftrace ring, run the following command:
Enable work queue trace
-
To enable work queue tracing, run the following commands:
Sample output:
Enable Interrupt request (IRQ) trace
-
To enable interrupt tracing, run the following commands:
Sample output:
Enable scheduler trace
-
To trace context switches between tasks, run the following commands to enable the
sched_switchtracer:Sample output:
Find IRQ latency
- To find the maximum IRQ latency and pre-emption latency in the system, enable ftrace configurations for
IRQOFFandPREEMPTIONOFFas follows:For this configuration to take effect, recompile the kernel. This configuration detects latency in milliseconds effectively. - To enable tracing, run the following commands:
- To find the maximum latency observed in the system, configure
tracing_max_latency = 0. To detect any latency higher than the specified limit, set the threshold level in microseconds. For example,
Documentation/trace/ftrace.txt file available in the kernel documentation.
