Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/control_limits.stp

raw
1
2 # for MAXNESTING testing
3 function recurse (n) {
4 if (n > 0) recurse (n-1);
5 println(n)
6 }
7 probe begin {
8 recurse (7)
9 }
10
11 # for MAXACTION testing
12 probe begin {
13 for (i=0; i<498; i++) {}
14 }
15
16 global array
17
18 # for MAXMAPENTRIES testing
19 probe begin {
20 i=0
21 while (i<20) {
22 array[i]=100
23 i++
24 }
25 }
26
27 # for MAXSTRINGLEN testing
28 probe begin {
29 s = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" # last 8 will be \0'd
30 if (strlen(s) < 127) error ("MAXSTRINGLEN reduced")
31 if (strlen(s) > 127) error ("MAXSTRINGLEN enlarged")
32 }
33
34
35 probe begin { exit () }
36