Re (2): [Oberon] DISPOSE
Gérard_Meunier <gmeunier@club-internet.fr> wrote:
I don't understand all the outputs,
The following command can be used to set traceHeap without booting. MODULE AosGCTest4; IMPORT AosHeap, In; PROCEDURE TraceHeap*; (* {n} ~ *) VAR n: LONGINT; BEGIN In.Open; In.LongInt(n); AosHeap.traceHeap := {}; WHILE In.Done DO IF (n >= 0) & (n <= 31) THEN INCL(AosHeap.traceHeap, n) END; In.LongInt(n) END END TraceHeap; END AosGCTest4. System.OpenKernelLog AosGCTest4.TraceHeap ~ AosGCTest4.TraceHeap 7 ~ AosGCTest4.TraceHeap 12 ~ The flags are: 0 1 NR NEW record 1 2 NA/NV NEW array 2 4 NS SYSTEM.NEW 3 8 DR deallocate record # 4 16 DA deallocate array # 5 32 DS deallocate sysblk # 6 64 NT NewType 7 128 8 256 FB show free blocks # 9 512 DP deallocate protrec # 10 1024 finalizers 11 2048 live/dead # # influences timing The timings are always reported, and are in us, if your MHz config string correctly defines the processor speed, e.g. MHz=180 for a 180MHz processor. Example output with AosGCTest4.TraceHeap 12 ~ : [P0@180MHz GC tot=30855 mod=4171 obj=21275 fin=18 swp=5391 clr=0 rts=1039 rch=8842 fre=348 fina=35 find=0 CG] {P0 Heap: 12460 total, 4556 free, 2583 largest, Mem: 48768 total, 608 low, 35400 high} tot is the total GC time (30855us = 30.8ms in this case). mod is the time for tracing the module list (all globals and their children). obj is the time for root objects fin is the time to check finalized objects swp is the sweep time clr is the debug (0DEADDEADH) clearing time (0 here because I disabled it) rts is the number of root objects rch is the number of reachable (live) objects fre is the number of freed objects (in the free lists) fina is the number of live finalized objects find is the number of dead finalized objects It would be interesting to see what output you get for AosGCTest4.TraceHeap 12 ~ and a typical GC on your application. BTW I have some ideas on how to improve the garbage collector, but it would be quite a big and intricate project. Implementing DISPOSE should be easier. -- Pieter -- Pieter Muller, Computer Systems Institute, ETH Zurich / MCT Lab, Zurich Native Oberon OS: http://www.oberon.ethz.ch/native/
Pieter,
It would be interesting to see what output you get for AosGCTest4.TraceHeap 12 ~ and a typical GC on your application.
Below are some GC logs at the beginning of the calculus, followed by some other ones at the end. Little by little, GC occurs more often and lasts longer, so that the system becomes completely freezed.
BTW I have some ideas on how to improve the garbage collector, but it would be quite a big and intricate project. Implementing DISPOSE should be easier.
I suppose it would be too difficult for me to implement it, but if I can help... Regards. Gérard [P0@600MHz GC tot=532340 mod=1774 obj=200816 fin=6313 swp=143420 clr=180017 rts=2735 rch=70234 fre=380003 fina=85 find=803 CG] {P0 Heap: 50504 total, 31442 free, 2620 largest, Mem: 261756 total, 612 low, 208372 high} [P0@600MHz GC tot=524672 mod=1730 obj=332670 fin=19173 swp=120495 clr=50603 rts=6297 rch=221037 fre=87898 fina=69 find=2641 CG] {P0 Heap: 50504 total, 19493 free, 2620 largest, Mem: 261756 total, 612 low, 208156 high} [P0@600MHz GC tot=834619 mod=1755 obj=562901 fin=16680 swp=182722 clr=70561 rts=5586 rch=372886 fre=97859 fina=72 find=2255 CG] {P0 Heap: 53124 total, 10621 free, 2620 largest, Mem: 261756 total, 612 low, 205516 high} [P0@600MHz GC tot=841548 mod=1776 obj=621016 fin=6238 swp=185867 clr=26651 rts=2768 rch=421013 fre=63731 fina=74 find=856 CG] {P0 Heap: 53124 total, 7260 free, 2620 largest, Mem: 261756 total, 612 low, 205504 high} [P0@600MHz GC tot=936740 mod=551080 obj=155723 fin=4505 swp=202749 clr=22683 rts=2252 rch=471832 fre=60797 fina=57 find=636 CG] {P0 Heap: 55744 total, 6074 free, 2620 largest, Mem: 261756 total, 612 low, 202944 high} [P0@600MHz GC tot=1182959 mod=1767 obj=923968 fin=3580 swp=216659 clr=36984 rts=2042 rch=513000 fre=58283 fina=61 find=520 CG] {P0 Heap: 58364 total, 5595 free, 2620 largest, Mem: 261756 total, 612 low, 200312 high} [P0@600MHz GC tot=1074091 mod=646187 obj=176853 fin=2687 swp=230452 clr=17913 rts=1809 rch=550183 fre=58549 fina=62 find=398 CG] {P0 Heap: 60984 total, 5409 free, 2620 largest, Mem: 261756 total, 612 low, 197688 high} [P0@600MHz GC tot=1156573 mod=1755 obj=873683 fin=1807 swp=244032 clr=35296 rts=1522 rch=584229 fre=60651 fina=59 find=267 CG] {P0 Heap: 63604 total, 5466 free, 2620 largest, Mem: 261756 total, 612 low, 195076 high} [P0@600MHz GC tot=1222760 mod=1781 obj=925383 fin=2233 swp=258034 clr=35330 rts=1667 rch=619527 fre=62977 fina=63 find=335 CG] {P0 Heap: 66224 total, 5391 free, 2620 largest, Mem: 261756 total, 612 low, 192444 high} [SNIP] [P0@600MHz GC tot=3985691 mod=1636 obj=3108957 fin=20 swp=849870 clr=25207 rts=988 rch=2121043 fre=147180 fina=61 find=0 CG] {P0 Heap: 178884 total, 4024 free, 0 largest, Mem: 261756 total, 612 low, 79792 high} [P0@600MHz GC tot=3978720 mod=2464132 obj=639485 fin=20 swp=849874 clr=25208 rts=986 rch=2121038 fre=147187 fina=61 find=0 CG] {P0 Heap: 178884 total, 4025 free, 0 largest, Mem: 261756 total, 612 low, 79792 high} [P0@600MHz GC tot=3979159 mod=2464133 obj=639935 fin=21 swp=849864 clr=25207 rts=987 rch=2121042 fre=147186 fina=61 find=0 CG] {P0 Heap: 178884 total, 4025 free, 0 largest, Mem: 261756 total, 612 low, 79792 high} [P0@600MHz GC tot=3979137 mod=2464128 obj=639914 fin=31 swp=849859 clr=25204 rts=983 rch=2121051 fre=147177 fina=60 find=1 CG] [P0@600MHz GC tot=3979175 mod=2464137 obj=639942 fin=20 swp=849872 clr=25204 rts=987 rch=2121052 fre=147175 fina=60 find=1 CG] {P0 Heap: 178884 total, 4024 free, 0 largest, Mem: 261756 total, 612 low, 79796 high} [P0@600MHz GC tot=3978525 mod=2463500 obj=639924 fin=20 swp=849874 clr=25206 rts=989 rch=2121048 fre=147179 fina=60 find=0 CG] {P0 Heap: 178884 total, 4025 free, 0 largest, Mem: 261756 total, 612 low, 79796 high} {P0 Heap: 178884 total, 4024 free, 0 largest, Mem: 261756 total, 612 low, 79796 high} [P0@600MHz GC tot=3986071 mod=1640 obj=3109343 fin=20 swp=849862 clr=25205 rts=996 rch=2121055 fre=147174 fina=60 find=0 CG] [P0@600MHz GC tot=4002553 mod=1640 obj=3109385 fin=20 swp=849861 clr=41648 rts=994 rch=2121055 fre=147175 fina=60 find=0 CG] {P0 Heap: 181504 total, 6644 free, 2620 largest, Mem: 261756 total, 612 low, 77176 high} {P0 Heap: 181504 total, 6644 free, 2620 largest, Mem: 261756 total, 612 low, 77172 high} [P0@600MHz GC tot=4024778 mod=1643 obj=3131768 fin=1482 swp=859530 clr=30355 rts=1471 rch=2135188 fre=159056 fina=53 find=226 CG] {P0 Heap: 181504 total, 5481 free, 508 largest, Mem: 261756 total, 612 low, 77216 high}
participants (2)
-
Gérard Meunier -
muller@inf.ethz.ch