GGC Questions
Mike Stump
mrs@apple.com
Tue Oct 25 21:16:00 GMT 2005
On Oct 24, 2005, at 9:43 PM, Ranjit Mathew wrote:
> 1. we want to reduce time spent in the GC,
Doesn't really help on time.
> 2. we know it doesn't matter for PCH, so we do it to
> reduce the size of the PCH and its loading time,
No, doesn't reduce the size, nor the load time. We can only know
that it doesn't matter for PCH.
> 3. some other reason?
Andrew hit it one of the reasons on the head. That, or, one doesn't
want to go to the trouble of marking all the data-structures.
> Your answer seems to indicate that is something
> like #2 because PCH runs before any of these
> fields is of any use.
Yes, this is _why_ one can mark them as skip.
> That array ("str") in "tree_string" is of variable length and
> its length is indicated by the "length" field. So technically
> at least it should be marked with a GTY((length(...)))
> marker.
I don't believe it is necessary.
> Well, the current compiler crashes building
> "java/lang/Character.java" where in the debugger I see the
> Tree-SSA operands processing code "going bonkers". So
> I am trying to figure out if this is because something was
> yanked from under its feet by the GC or because there
> is some bug in the relevant Tree-SSA code from the time
> of the merge or because somehow the GCJX front-end
> is not creating the trees properly or something else.
Set a breakpoint on creation, and one of use, either, the data
matches, or it doesn't. If it doesn't set a watch point on the
changed data, and rerun. Careful to enable the breakpoint only after
creation, as watch doesn't like unmapped mempory (on darwin anyway).
You can also tell GC to never collect, and thus `know' if that is the
issue. Also, you can breakpoint the walker/freer and check if the
address that can't be freed is. Doing an up from that point tells
you the context it was in when freed. At times, collect isn't
allowed, and it might be one of those times. Breaking on freer is
easier to understand than breaking on a watch point. ggc_free might
be called on data that isn't totally free, just comment out the
ggc_free call to fix.
More information about the Gcc
mailing list