RFR (M): 8129558: Coalesce dead objects during removal of self-forwarded pointers
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jun 25 20:35:58 UTC 2015
Hi,
On Thu, 2015-06-25 at 13:06 -0700, Tony Printezis wrote:
> Thomas,
>
> Inline, towards the end.
>
> >
[...]
> > You are right about this. However considering these are going to be
> > dead
> > objects, they will never be iterated over using the BOT in
> > performance
> > sensitive code.
>
> I agree. But isn’t there an edge case? Imagine you have the sequence
> of D* dead objects, followed by A (a live object):
>
> D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 A
>
> Let’s say your code replaces the D* dead objects with two filler
> objects, F0 and F1:
>
> F0 F1 A
>
> If A’s start is in the middle of a card, in order to scan that card,
> won’t the BOT do more work to find the first object on that card given
> that it will have to look-up F0 which is further away? Also, note that
> the BOT look-up for A will actually NOT return the first object on
> that card (F0). Will that break any asserts?
actually there are cases when the code may try to scan random cards
within these regions anyway: remembered sets may contain stale entries
forever to these areas, so these objects may be scanned through
(needlessly).
However this will likely be fast, as the code will likely create a
log-based slide on the BOT for combined F0/F1. Catching up to A from F0
will be fast because there are just two objects in there now to iterate,
and after that first lookup of the start of A, the BOT will have been
fixed up.
I will fix it anyway for hygiene reasons, it will not be the nicest code
but do the job. Still a lot faster than trying to fix up the BOT for
every tiny object as done previously. :)
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list