blob: 6eccfa337a75a027b183f214200f7412a09a32e5 (
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
|
global time
global threshold=2 /* milliseconds */
global nesting
probe nfsd.proc.entries {
tid=tid()
n=nesting[tid]++
time[tid,n] = gettimeofday_ms()
}
probe nfsd.proc.return {
tid=tid()
n = (nesting[tid] = nesting[tid]-1)
if (n < 0) {
nesting[tid]=0; next
} // missed entry event
if (! ([tid,n] in time)) next // missed entry event
dt = gettimeofday_ms()-time[tid,n]
delete time[tid,n]
if (dt>threshold) {
printf("%s(%d) %s took too long (%d > %d)\n",
execname(), tid, name, dt, threshold)
}
}
probe begin { log("starting nfsd-timer probe") }
probe end { log("ending nfsd-timer probe") }
|