Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 95299258dbdf9a86cefd89b97c0d81e5 > files > 262

systemtap-1.2-1.fc13.i686.rpm

#!/usr/bin/stap

global profile, pcount
probe timer.profile {
  pcount <<< 1
  fn = probefunc ()
  if (fn != "") profile[fn] <<< 1
}
probe timer.ms(5000) {
  printf ("\n--- %d samples recorded:\n", @count(pcount))
  foreach (f in profile- limit 10) {
    printf ("%-30s\t%6d\n", f, @count(profile[f]))
  }
  delete profile
  delete pcount
}