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

Kim Barrett kim.barrett at oracle.com
Mon Sep 9 18:28:19 UTC 2019


> On Sep 9, 2019, at 6:28 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> Hi,
> 
> On 9/6/19 11:25 PM, Kim Barrett wrote:
>> 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.
> 
> This looks good. Great refactoring.
> 
> Thanks,
>  Thomas

Thanks.




More information about the hotspot-gc-dev mailing list