- You can enable a tracer by echoing its name to the current_tracer file. No tracers are enabled by default:
$ cat /sys/kernel/debug/tracing/current_tracer nop
- You can disable all tracers by executing the following command:
$ echo -n nop > /sys/kernel/debug/tracing/current_tracer
We use echo -n to avoid the trailing newline when echoing to files in sysfs.
- To enable the function tracer, you would execute:
$ echo -n function > /sys/kernel/debug/tracing/current_tracer
- A prettier graph can be obtained by using the function_graph tracer as follows:
$ echo -n function_graph > /sys/kernel/debug/tracing/current_tracer