From 7ad9d4f58308c4d8f35f2212ce82212301dfeeff Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 2 Jan 2007 04:33:41 +0000 Subject: 2007-01-01 Frank Ch. Eigler * configure.ac: Bump version to 0.5.12 for release. * configure: Regenerated. * NEWS, AUTHORS: Populate & repopulate. * examples/*: Added several .stp/.txt files from the wiki. --- examples/pf2.stp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/pf2.stp (limited to 'examples/pf2.stp') diff --git a/examples/pf2.stp b/examples/pf2.stp new file mode 100644 index 00000000..dce2cdec --- /dev/null +++ b/examples/pf2.stp @@ -0,0 +1,15 @@ +#! stap +global profile, pcount +probe timer.profile { + pcount ++ + fn = probefunc () + if (fn != "") profile[fn] ++ # <<< 1 would be better ... +} +probe timer.ms(4000) { + printf ("\n--- %d samples recorded:\n", pcount) + foreach (f in profile- limit 10) { # ... but can only sort scalar arrays (bz #2305) + printf ("%s\t%d\n", f, profile[f]) + } + delete profile + pcount = 0 +} -- cgit