Debian Codegraph @

testsuite/systemtap.examples/interrupt/scf.stp

raw
1 #! /usr/bin/env stap
2 # scf.stp
3 # A reimplementation of user script:smp_call_function example given at OLS 2005
4 # in the current language.
5
6 global traces
7
8 probe begin { print("Starting probe, type control-c to stop.\n") }
9
10 probe kernel.function("smp_call_function")
11 {
12 traces[pid(), pexecname(), backtrace()] ++
13 }
14
15 probe end {
16 foreach ([pid, name, stack] in traces-) { # sort by frequency encountered
17 printf ("traces[%d,%s,\n", pid, name)
18 print_syms (stack)
19 printf ("] = %d\n", traces[pid, name, stack]);
20 }
21 }