Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.maps/log.stp

raw
1 global foo
2
3 probe begin
4 {
5 val = 1
6 # add in one of each power of two
7 for (i = 0; i < 63; i++) {
8 foo <<< val
9 val <<= 1
10 }
11
12 val = 1;
13 # now add the negative powers of two
14 for (i = 0; i < 64; i++) {
15 foo <<< -val
16 val <<= 1
17 }
18
19 # add in a bunch of zeros
20 for (i=0; i<20; i++)
21 foo <<< 0
22
23 print(@hist_log(foo))
24 exit()
25 }