blob: 1108fdea24469db643057f3c72e5c0ba32ffde30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# scf.stp
# A reimplementation of user script:smp_call_function example given at OLS 2005
# in the current language.
#
# Will Cohen
# 9/22/2005
global traces
probe kernel.function("smp_call_function")
{
traces[pid(), pexecname(), backtrace()] += 1;
}
probe begin { print( "starting probe\n" ); }
probe end {
print("end of data collection\n");
foreach( [pid, name, stack] in traces){
print( "traces[" . sprint(pid) . "," . name . ",\n" );
print_stack(stack)
print( "] = " . sprint(traces[pid, name, stack]) );
print( "\n" );
}
}
|