Skip to content

Instantly share code, notes, and snippets.

@giraldeau
Last active August 29, 2015 14:17
Show Gist options
  • Save giraldeau/fcf10d8b38738ea16f00 to your computer and use it in GitHub Desktop.
Save giraldeau/fcf10d8b38738ea16f00 to your computer and use it in GitHub Desktop.
#!/bin/sh -x
DBG=/sys/kernel/debug/tracing
do_echo() {
echo $1 | sudo tee $DBG/$2
}
do_echo function current_tracer
do_echo perf_event_overflow set_ftrace_filter
do_echo 1 tracing_on
do_echo 1 options/func_stack_trace
./.libs/test_signal > log
do_echo 0 tracing_on
sudo cat $DBG/trace > trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment