Skip to content

Instantly share code, notes, and snippets.

@jrelo
Created November 10, 2016 20:51
Show Gist options
  • Save jrelo/c087cd3efeaf0c0dc668113784df8bb3 to your computer and use it in GitHub Desktop.
Save jrelo/c087cd3efeaf0c0dc668113784df8bb3 to your computer and use it in GitHub Desktop.
ftrace it
#!/bin/bash
DEBUGFS=`grep debugfs /proc/mounts | awk '{ print $2; }'`
echo $$ > $DEBUGFS/tracing/set_ftrace_pid
echo function > $DEBUGFS/tracing/current_tracer
echo 1 > $DEBUGFS/tracing/tracing_on
exec $*
echo 0 > $DEBUGFS/tracing/tracing_on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment