Skip to content

Instantly share code, notes, and snippets.

@brb
Created August 16, 2016 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brb/28dac40cbc712402718188ade947d198 to your computer and use it in GitHub Desktop.
Save brb/28dac40cbc712402718188ade947d198 to your computer and use it in GitHub Desktop.
ftrace example for kernel call graphs
echo 0 > /sys/kernel/debug/tracing/tracing_on
echo > /sys/kernel/debug/tracing/trace
echo function_graph > /sys/kernel/debug/tracing/current_tracer
echo $KERNEL_FUNCTION > /sys/kernel/debug/tracing/set_graph_function
echo 1 > /sys/kernel/debug/tracing/tracing_on
$DO_STUFF
echo 0 > /sys/kernel/debug/tracing/tracing_on
echo > /sys/kernel/debug/tracing/set_graph_function
cat /sys/kernel/debug/tracing/trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment