[gclist] Two conservative collectors

Boehm, Hans hboehm@exch.hpl.hp.com
Thu, 18 Nov 1999 13:24:24 -0800


[Charles Fiterman wrote:]
> Our inhouse use of debug info is approaching the point where a precise
scan
> of the stack would make sense.
That's actually more ambitious than what I was talking about.  The only way
you could possibly do this with our collector is by providing your own
traversal procedure.  Where you get the layout info from is your problem.  I
would be surprised if you could get reliable stack layout information,
especially about temporary values and at high optimization levels, from
debug information generated by existing compilers.

> As to traceback info, to be useful this involves understanding data
> definitions. I'm sure you can give it in hex but what earthly good is that
> to humans. Traceback has to say things like

>   filex.cpp:17 frobNick *foo == 0x127080 (vtbl frobNick)
>   0x127088 (char *)name == 0x141200 (no vtbl)

> You would be saying

>   0x560800 == 0x127080
>   0x127088 == 0x141200

This is important, and we don't do a very good job of it.  And there's a lot
of work involved in getting this right, especially if you want it usable
without a debugger.  I've appended a traceback with a randomly chosen start
point that I got out of our current collector (with a particularly boring
test program).  You do get the allocation point and requested size for the
object.  On some other platforms you get a bit more info about the stack at
allocation time.  You do not get type information, and you do not
automatically get root addresses mapped back to variable names.  The
Geodesic Systems collector already has much better infrastructure in this
area.  I'm not likely to invest a lot of effort in fixing this very soon.
 
Chose address 0x80fb567 in object
0x80fb568 (trace_test.c:11, sz=8)

Reachable via 0 levels of pointers from offset 4 in object:
0x80fb7e8 (trace_test.c:11, sz=8)

Reachable via 1 levels of pointers from offset 0 in object:
0x80fb810 (trace_test.c:11, sz=8)

Reachable via 2 levels of pointers from offset 4 in object:
0x80fa220 (trace_test.c:11, sz=8)

Reachable via 3 levels of pointers from offset 4 in object:
0x80f9630 (trace_test.c:11, sz=8)

Reachable via 4 levels of pointers from offset 0 in object:
0x80f9658 (trace_test.c:11, sz=8)

Reachable via 5 levels of pointers from offset 0 in object:
0x80f9680 (trace_test.c:11, sz=8)

Reachable via 6 levels of pointers from offset 0 in object:
0x80f96a8 (trace_test.c:11, sz=8)

Reachable via 7 levels of pointers from offset 0 in object:
0x80f96d0 (trace_test.c:11, sz=8)

Reachable via 8 levels of pointers from offset 4 in object:
0x80e6d10 (trace_test.c:11, sz=8)

Reachable via 9 levels of pointers from root at 0x80580e8