Debian Codegraph @

testsuite/systemtap.examples/io/traceio2.stp

raw
1 #! /usr/bin/env stap
2
3 global device_of_interest
4
5 probe begin {
6 /* The following is not the most efficient way to do this.
7 One could directly put the result of usrdev2kerndev()
8 into device_of_interest. However, want to test out
9 the other device functions */
10 dev = usrdev2kerndev($1)
11 device_of_interest = MKDEV(MAJOR(dev), MINOR(dev))
12 }
13
14 probe vfs.{write,read}
15 {
16 if (dev == device_of_interest)
17 printf ("%s(%d) %s 0x%x\n",
18 execname(), pid(), ppfunc(), dev)
19 }