diff options
author | hunt <hunt> | 2005-12-15 05:47:48 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-12-15 05:47:48 +0000 |
commit | 2cf16419ca4ce9ca926a04affc91e98861f672c1 (patch) | |
tree | 02b125ec9ac953817966b69f4e1a9a4e09807373 | |
parent | 36e17158ed72646a126c5494e765c704e120f18a (diff) | |
download | systemtap-steved-2cf16419ca4ce9ca926a04affc91e98861f672c1.tar.gz systemtap-steved-2cf16419ca4ce9ca926a04affc91e98861f672c1.tar.xz systemtap-steved-2cf16419ca4ce9ca926a04affc91e98861f672c1.zip |
*** empty log message ***
-rwxr-xr-x | testsuite/buildok/pmap_foreach.stp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/buildok/pmap_foreach.stp b/testsuite/buildok/pmap_foreach.stp new file mode 100755 index 00000000..8cc8decd --- /dev/null +++ b/testsuite/buildok/pmap_foreach.stp @@ -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])) +} |