diff options
author | William Cohen <wcohen@redhat.com> | 2009-01-30 12:33:14 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-01-30 12:33:14 -0500 |
commit | 1cc8a4c78bff79ea8b60e916e5cd01571b469b03 (patch) | |
tree | 4e32eca7acddc28d2e5aa0de5a1bc559a2550c95 /testsuite/systemtap.examples/interrupt/scf.stp | |
parent | 9fbda39bf7687ceeee28813f30f6e3ec5c72fc5d (diff) | |
download | systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.tar.gz systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.tar.xz systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.zip |
Move the scf.stp example from systemtap.samples to systemtap.examples.
Diffstat (limited to 'testsuite/systemtap.examples/interrupt/scf.stp')
-rw-r--r-- | testsuite/systemtap.examples/interrupt/scf.stp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/interrupt/scf.stp b/testsuite/systemtap.examples/interrupt/scf.stp new file mode 100644 index 00000000..f84c2494 --- /dev/null +++ b/testsuite/systemtap.examples/interrupt/scf.stp @@ -0,0 +1,21 @@ +#! /usr/bin/env stap +# scf.stp +# A reimplementation of user script:smp_call_function example given at OLS 2005 +# in the current language. + +global traces + +probe begin { print("Starting probe, type control-c to stop.\n") } + +probe kernel.function("smp_call_function") +{ + traces[pid(), pexecname(), backtrace()] ++ +} + +probe end { + foreach ([pid, name, stack] in traces-) { # sort by frequency encountered + printf ("traces[%d,%s,\n", pid, name) + print_stack (stack) + printf ("] = %d\n", traces[pid, name, stack]); + } +} |