diff options
Diffstat (limited to 'testsuite/semok/thirteen.stp')
-rwxr-xr-x | testsuite/semok/thirteen.stp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/semok/thirteen.stp b/testsuite/semok/thirteen.stp new file mode 100755 index 00000000..91d767fb --- /dev/null +++ b/testsuite/semok/thirteen.stp @@ -0,0 +1,27 @@ +#! stap -p2 + +function trace (s) { return 0 } + +# define some aliases which resolve to kernel functions + +probe pipe_read = kernel.function("pipe_read") +{ + fname = "pipe_read" + reading_from_pipe = 1 +} + +probe pipe_write = kernel.function("pipe_write") +{ + fname = "pipe_write" + reading_from_pipe = 0 +} + +# use the aliases, including variables defined in them + +probe pipe_read, pipe_write +{ + if (reading_from_pipe) + trace("reading from pipe in " . fname) + else + trace("writing to pipe in " . fname) +} |