Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 2b12d0199a2bbc4a02ef3834d926ac4a > files > 65

systemtap-client-1.8-6.el5.x86_64.rpm

#!/usr/bin/stap

function trace(entry_p, extra) {
  %( $# > 1 %? if (tid() in trace) %)
  printf("%s%s%s %s\n",
         thread_indent (entry_p),
         (entry_p>0?"->":"<-"),
         probefunc (),
         extra)
}


%( $# > 1 %?
global trace
probe $2.call {
  trace[tid()] = 1
}
probe $2.return {
  delete trace[tid()]
}
%)

probe $1.call   { trace(1, $$parms) }
probe $1.return { trace(-1, $$return) }