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
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
stap -p2 --ignore-vmlinux --kmap=/proc/kallsyms -e '
global ncall
/*
* We want
* probe syscall.*
* but in the syscall tapset, the prologue blocks for the following system
* calls contain "if" statements that cause target variables to be read...
* and we cannot evaluate target variables without dwarf.
* bdflush, clock_nanosleep, fork, futex, getrusage, mq_open, open, sysfs
*/
probe
syscall.a*,
/* skip b */
/* skip c */
syscall.d*,
syscall.e*,
/* skip f */
/* skip g */
/* no h */
syscall.i*,
/* no j */
syscall.k*,
syscall.l*,
/* skip m */
syscall.n*,
/* skip o */
syscall.p*,
syscall.q* ?,
syscall.r*,
/* skip s */
syscall.t*,
syscall.u*,
syscall.v*,
syscall.w*
/* no xyz */
{
printf("%s called\n", name)
if (ncall++ > 50)
exit()
}
'
|