Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates > by-pkgid > fe7c341633b7d979ab8178b22304d6b5 > files > 33

systemtap-1.3-1.1.mga1.i586.rpm

#! /usr/bin/env 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) }