From 2b066ec1b8801b08052a68282ce34ef9c425ae8f Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 21 May 2005 01:35:34 +0000 Subject: * at long last, a more full-bodied snapshot 2005-05-20 Frank Ch. Eigler Many changes throughout. Partial sketch of translation output. * elaborate.*: Elaboration pass. * translate.*: Translation pass. * staptree.*: Simplified for visitor concept. * main.cxx: Translator mainline. * *test.cxx: Removed. * testsuite/*: Some new tests, some changed for newer syntax. --- testsuite/provok/one.stp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 testsuite/provok/one.stp (limited to 'testsuite/provok/one.stp') diff --git a/testsuite/provok/one.stp b/testsuite/provok/one.stp new file mode 100755 index 00000000..e51ee28a --- /dev/null +++ b/testsuite/provok/one.stp @@ -0,0 +1,26 @@ +#! stap + +global ar1, ar2 + +function string (v) { return "" } # to become built-in + +function search (key) +{ + if (key in ar1) + { ar1[key] ++; return ar2[ar1[key]] } + else + return "no can do" +} + +probe syscall("zamboni") +{ + thread->ar2 = $tgid; + search ($pid) +} + +probe end +{ + for (key in ar2) + # if (key in ar2) + printk ("this: " . string (key) . " was " . string (ar2[key])) +} -- cgit