Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8e87fca2f49595adc16d9aa519a6edad > files > 164

systemtap-1.6-1.fc14.x86_64.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
}