RFR: 8221361: Eliminate two-phase initialization for PtrQueueSet classes

Kim Barrett kim.barrett at oracle.com
Fri Sep 6 23:13:16 UTC 2019

> On Sep 6, 2019, at 5:53 PM, Aleksey Shipilev <shade at redhat.com> wrote:
> On 9/6/19 11:25 PM, Kim Barrett wrote:
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8221361/open.00/
> Shenandoah parts look good.


> Thank you for going extra mile there. It is a bit unfortunate we have
> lost the ability to use cached _heap in ShenandoahSATBMarkQueueSet::filter, but this should not be
> important.

Same thing happend for G1.  I thought about having a lazily initialized cached _heap, but decided
that wouldn’t really be any better.  We could have it be late assigned, breaking the “fully initialized
at construction time” invariant, but I also don’t think it should be important.  We could also move
{G1CollectedHeap, ShenandoahHeap}::heap() to their respective .inline.hpp files...

I also note that it used to work this way (for G1) back before we restructured the SATB buffer filtering
into its current form for sharing between G1 and Shenandoah.  That is, G1’s SATBMarkQueue::filter
obtained the g1h by calling G1CollectedHeap::heap().

More information about the hotspot-gc-dev mailing list