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

Kim Barrett kim.barrett at oracle.com
Fri Sep 6 21:25:24 UTC 2019

Please review this refactoring of PtrQueueSet to eliminate two-phase
construction.  The objects are now fully constructed by the constructor and
there is no longer a need for an initialize() function.

In particular, the allocator is now a constructor argument.  And in the case
of G1DirtyCardQueueSet, the CBL monitor is also a constructor argument.

This means that PtrQueueSet objects are always fully initialized.  As a
consequence, we can eliminate the bootstrapping kludge in PtrQueue for
initializing the _capacity_in_bytes member.

This change required a little bit of refactoring for Shenandoah.  The SATB
buffer allocator has been moved from the SATB pqset to the barrier set.  When
constructing the barrier set, the allocator is constructed first and then
passed as an argument to the pqset constructor. This is all consistent with
G1's arrangement.  Someone from the Shenandoah team should check this.



mach5 tier1.

Local (linux-x64) build with Shenandoah and ran hotspot:tier1 tests with
-XX:+UseShenandoahGC, ignoring failures for tests that don't support
Shenandoah (anything involving graal or aot, for example).

More information about the hotspot-gc-dev mailing list