summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.maps/log.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.maps/log.stp')
-rw-r--r--testsuite/systemtap.maps/log.stp25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/systemtap.maps/log.stp b/testsuite/systemtap.maps/log.stp
new file mode 100644
index 00000000..5b1bf4bb
--- /dev/null
+++ b/testsuite/systemtap.maps/log.stp
@@ -0,0 +1,25 @@
+global foo
+
+probe begin
+{
+ val = 1
+ # add in one of each power of two
+ for (i = 0; i < 63; i++) {
+ foo <<< val
+ val <<= 1
+ }
+
+ val = 1;
+ # now add the negative powers of two
+ for (i = 0; i < 64; i++) {
+ foo <<< -val
+ val <<= 1
+ }
+
+ # add in a bunch of zeros
+ for (i=0; i<20; i++)
+ foo <<< 0
+
+ print(@hist_log(foo))
+ exit()
+}