summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/three.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/buildok/three.stp')
-rwxr-xr-xtestsuite/buildok/three.stp25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/buildok/three.stp b/testsuite/buildok/three.stp
new file mode 100755
index 00000000..013b5ac5
--- /dev/null
+++ b/testsuite/buildok/three.stp
@@ -0,0 +1,25 @@
+#! stap -p4
+
+# 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)
+ log ("reading from pipe in " . fname)
+ else
+ log ("writing to pipe in " . fname)
+}