Re (2): [Oberon] DISPOSE
muller at inf.ethz.ch
muller at inf.ethz.ch
Tue Sep 3 22:29:47 CEST 2002
Gérard_Meunier <gmeunier at 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 at 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/
More information about the Oberon
mailing list