From 384c5fe974abe35ab11dce4446dc5eed86585a3b Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 7 Aug 2008 16:47:18 -0400 Subject: samples: separate into subdirectories by subsystem --- testsuite/systemtap.examples/process/pf2.stp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 testsuite/systemtap.examples/process/pf2.stp (limited to 'testsuite/systemtap.examples/process/pf2.stp') diff --git a/testsuite/systemtap.examples/process/pf2.stp b/testsuite/systemtap.examples/process/pf2.stp new file mode 100755 index 00000000..a804c3ff --- /dev/null +++ b/testsuite/systemtap.examples/process/pf2.stp @@ -0,0 +1,16 @@ +#! /usr/bin/env 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 +} -- cgit