Debian Codegraph @

testsuite/buildok/three.stp

raw
1 #! stap -p4
2
3 # define some aliases which resolve to kernel functions
4
5 probe pipe_read = kernel.function("pipe_read")
6 {
7 fname = "pipe_read"
8 reading_from_pipe = 1
9 }
10
11 probe pipe_write = kernel.function("pipe_write")
12 {
13 fname = "pipe_write"
14 reading_from_pipe = 0
15 }
16
17 # use the aliases, including variables defined in them
18
19 probe pipe_read, pipe_write
20 {
21 if (reading_from_pipe)
22 log ("reading from pipe in " . fname)
23 else
24 log ("writing to pipe in " . fname)
25 }