diff options
Diffstat (limited to 'testsuite/systemtap.samples/scf2.stp')
-rw-r--r-- | testsuite/systemtap.samples/scf2.stp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/systemtap.samples/scf2.stp b/testsuite/systemtap.samples/scf2.stp new file mode 100644 index 00000000..5ad46350 --- /dev/null +++ b/testsuite/systemtap.samples/scf2.stp @@ -0,0 +1,13 @@ +global traces + +probe kernel.function("smp_call_function") { + traces[pid(), pexecname(), backtrace()] ++ +} +probe timer.ms(1000) { exit () } +probe end { + foreach ([pid+, name, stack] in traces) { # sort by pid + printf ("traces[%d,%s,\n", pid, name) + print_stack (stack) + printf ("] = %d\n", traces[pid, name, stack]); + } +} |