]> sourceware.org Git - systemtap.git/commitdiff
New testcase
authorhunt <hunt>
Wed, 14 Dec 2005 21:47:36 +0000 (21:47 +0000)
committerhunt <hunt>
Wed, 14 Dec 2005 21:47:36 +0000 (21:47 +0000)
testsuite/buildok/pmap_foreach.stp [new file with mode: 0755]

diff --git a/testsuite/buildok/pmap_foreach.stp b/testsuite/buildok/pmap_foreach.stp
new file mode 100755 (executable)
index 0000000..8cc8dec
--- /dev/null
@@ -0,0 +1,22 @@
+#! stap -p4
+
+global foo
+
+
+probe begin {
+       for (i=0;i<10;i+=2) { 
+               foo[1] <<< i    
+               foo[2] <<< i*i
+               foo[3] <<< i*i*i
+       }
+       foo[3] <<< 4*4*4
+       exit()
+}
+
+probe end {
+       for (i=1;i<4;i++)
+               printf("count of foo[%d] = %d\n", i, @count(foo[i]))
+
+       foreach (i in foo)
+               printf("count of foo[%d] = %d\n", i, @count(foo[i]))
+}
This page took 0.027766 seconds and 5 git commands to generate.