summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/thirteen.stp
diff options
context:
space:
mode:
authorgraydon <graydon>2005-07-06 01:32:09 +0000
committergraydon <graydon>2005-07-06 01:32:09 +0000
commit5227f1ea176e0a7af4eb7c51ef5d678ee67ad5df (patch)
tree7de149617814b5bcd1bc87511a97b7644dcf8114 /testsuite/semok/thirteen.stp
parent68cb0cb76051be893600fcb845089199f01e6839 (diff)
downloadsystemtap-steved-5227f1ea176e0a7af4eb7c51ef5d678ee67ad5df.tar.gz
systemtap-steved-5227f1ea176e0a7af4eb7c51ef5d678ee67ad5df.tar.xz
systemtap-steved-5227f1ea176e0a7af4eb7c51ef5d678ee67ad5df.zip
2005-07-05 Graydon Hoare <graydon@redhat.com>
* elaborate.{h,cxx}: Revert previous changes. * tapsets.{h,cxx}: Adapt to verbose as a member of session. * elaborate.cxx (alias_expansion_builder::build): Avoid copying locals between alias definition and use. * testsuite/semok/{twelve,thirteen,fourteen}.stp: New tests. * staptree.cxx (probe_alias::printsig): Print equals sign.
Diffstat (limited to 'testsuite/semok/thirteen.stp')
-rwxr-xr-xtestsuite/semok/thirteen.stp27
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)
+}