How to do it...

  1. 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  
  1. 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.
  1. To enable the function tracer, you would execute:
$ echo -n function > /sys/kernel/debug/tracing/current_tracer    
  1. A prettier graph can be obtained by using the function_graph tracer as follows:
$ echo -n function_graph  > /sys/kernel/debug/tracing/current_tracer    
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset