Debian Codegraph @

testsuite/systemtap.examples/general/callgraph.stp

raw
1 #! /usr/bin/env stap
2
3 function trace(entry_p)
4 {
5 printf("%s%s%s\n",
6 thread_indent (entry_p),
7 (entry_p>0?"->":"<-"),
8 ppfunc ())
9 }
10
11 probe $1.call { trace(1) }
12 probe $1.return { trace(-1) }