Ticket #1603: err.pir

File err.pir, 1.7 KB (added by coke, 12 years ago)
Line 
1.macro parrot_debug(location)
2
3  printerr "@ "
4  printerr .location
5  printerr "\n"
6
7  .include 'interpinfo.pasm'
8
9  $I1234 = interpinfo .INTERPINFO_TOTAL_MEM_ALLOC
10  printerr "    TOTAL_MEM_ALLOC............: "
11  printerr $I1234
12  printerr "\n"
13
14  $I1234 = interpinfo .INTERPINFO_ACTIVE_PMCS
15  printerr "    ACTIVE_PMCS................: "
16  printerr $I1234
17  printerr "\n"
18
19  $I1234 = interpinfo .INTERPINFO_ACTIVE_BUFFERS
20  printerr "    ACTIVE_BUFFERS.............: "
21  printerr $I1234
22  printerr "\n"
23
24  $I1234 = interpinfo .INTERPINFO_TOTAL_PMCS
25  printerr "    TOTAL_PMCS.................: "
26  printerr $I1234
27  printerr "\n"
28
29  $I1234 = interpinfo .INTERPINFO_TOTAL_BUFFERS
30  printerr "    TOTAL_BUFFERS..............: "
31  printerr $I1234
32  printerr "\n"
33
34  $I1234 = interpinfo .INTERPINFO_HEADER_ALLOCS_SINCE_COLLECT
35  printerr "    HEADER_ALLOCS_SINCE_COLLECT: "
36  printerr $I1234
37  printerr "\n"
38
39  $I1234 = interpinfo .INTERPINFO_MEM_ALLOCS_SINCE_COLLECT
40  printerr "    MEM_ALLOCS_SINCE_COLLECT...: "
41  printerr $I1234
42  printerr "\n"
43
44  $I1234 = interpinfo .INTERPINFO_TOTAL_COPIED
45  printerr "    TOTAL_COPIED...............: "
46  printerr $I1234
47  printerr "\n"
48
49  $I1234 = interpinfo .INTERPINFO_IMPATIENT_PMCS
50  printerr "    IMPATIENT_PMCS.............: "
51  printerr $I1234
52  printerr "\n"
53.endm
54
55.sub main :main
56
57    sweep 1
58    .parrot_debug('START')
59
60    .local int count
61    count= 1000
62  loop:
63        unless count goto done
64        $P0 = new 'CodeString'
65        $P0.'emit'("%%")
66        $S0 = $P0
67        dec count
68    goto loop
69  done:
70
71    sweep 1
72    .parrot_debug('POST LOOP')
73
74    sweep 1
75    .parrot_debug('END')
76.end