write barrier and card marking

Y. Srinivas Ramakrishna y.s.ramakrishna at oracle.com
Tue Aug 17 01:17:00 UTC 2010


Tony Guan wrote:

> This failures means that I failed to mark some card to be dirty when
> there are inter-generational pointers in it.  And because the
> pre-verification passed, the only reason for this failure is the full
> collection. Now can you point to me that where could this error happen
> during the full GC(marksweep)?

As far as i recall, following a full mark-sweep collection the
entire used section of a generation is marked dirty -- as long as there are
independently collectible generations, for example a young gen,
that has any surviving objects following that collection: this is a
conservative and simple, if slightly wasteful, strategy.
The next scavenge is therefore more expensive because of having to
deal with more dirty cards than required, but the redundant
card marks are sorted out and cleared in that collection. Perhaps you modified
the mark-sweep to be more discriminating during copying/updating (dirtying
only cards that have cross-generational references)?

i am sure you'll be able chase down your problem; all the best!
-- ramki



More information about the hotspot-gc-dev mailing list