summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples/primes.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-11-15 14:35:40 -0500
committerFrank Ch. Eigler <fche@elastic.org>2007-11-15 14:35:40 -0500
commit055e8b89db8f76f0ccc05d08acfe979ba50024d6 (patch)
tree5c51849d470c1ff74162fbeb6be56f190d524daf /testsuite/systemtap.samples/primes.stp
parent3cf29fed2ae7b36527c95c93754a4c0b0e51e749 (diff)
parentf781f849ceedba83580eead82c3baf949a9738db (diff)
downloadsystemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.tar.gz
systemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.tar.xz
systemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.samples/primes.stp')
-rw-r--r--testsuite/systemtap.samples/primes.stp6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/systemtap.samples/primes.stp b/testsuite/systemtap.samples/primes.stp
index 7e7aeb37..1072b4b2 100644
--- a/testsuite/systemtap.samples/primes.stp
+++ b/testsuite/systemtap.samples/primes.stp
@@ -1,5 +1,7 @@
#! stap
+
global odds, evens
+
probe begin {
# "no" and "ne" are local integers
for (i=1; i<10; i++) {
@@ -13,9 +15,9 @@ probe begin {
probe end {
foreach (x+ in odds) {
- log("odds[" . sprint(x) . "] = " . sprint(odds[x]))
+ printf("odds[%d] = %d\n", x, odds[x])
}
foreach (x in evens-) {
- log("evens[" . sprint(x) . "] = " . sprint(evens[x]))
+ printf("evens[%d] = %d\n", x, evens[x])
}
}