blob: 1dbfb61c57149fec9775dfd2eaa2f51457b3be9e (
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
26
27
28
29
30
31
32
33
34
|
#!/usr/bin/env stap
global nfscalls write_time
probe begin {
printf("Collecting top NFS procs...\n")
}
probe module("nfs").function("*@fs/nfs/*write.c")
{
nfscalls[probefunc()] = gettimeofday_us()
}
probe module("nfs").function("*@fs/nfs/*write.c").return
{
write_time = nfscalls[probefunc()]
nfscalls[probefunc()] = gettimeofday_us() - write_time
}
/*
probe module("nfs").function("*@fs/nfs/*direct.c")
{
nfscalls[probefunc()]++
}
probe kernel.function("*@fs/nfs/*pagelist.c") ?,
module("nfs").function("*@fs/nfs/*pagelist.c") ?
{
nfscalls[probefunc()]++
}
*/
probe end {
printf("Collating data...\n");
foreach (name in nfscalls- limit 50)
printf("%10d %s\n", nfscalls[name], name)
}
|