June 2017
Intermediate to advanced
478 pages
13h 14m
English
Before you can use Ftrace, you have to mount the debugfs filesystem, which by convention goes in the /sys/kernel/debug directory:
# mount -t debugfs none /sys/kernel/debug
All the controls for Ftrace are in the /sys/kernel/debug/tracing directory; there is even a mini HOWTO in the README file there.
This is the list of tracers available in the kernel:
# cat /sys/kernel/debug/tracing/available_tracersblk function_graph function nop
The active tracer is shown by current_tracer, which initially will be the null tracer, nop.
To capture a trace, select the tracer by writing the name of one of the available_tracers to current_tracer, and then enable tracing for a short while, as shown here:
# echo function > /sys/kernel/debug/tracing/current_tracer ...
Read now
Unlock full access