RFR: 8077836: Make sure G1ParGCAllocBuffer are marked as retired

Stefan Johansson stefan.johansson at oracle.com
Tue Apr 21 12:36:43 UTC 2015

Hi Per,

On 2015-04-21 14:34, Per Liden wrote:
> Hi Stefan,
> On 2015-04-15 15:08, Stefan Johansson wrote:
>> Hi,
>> Please review this fix for:
>> https://bugs.openjdk.java.net/browse/JDK-8077836
>> Webrev:
>> http://cr.openjdk.java.net/~sjohanss/8077836/hotspot.00/
>> Summary:
>> At the end of a G1 gc a call to G1ParGCAllocator::retire_alloc_buffers
>> is made, in this code we should make sure all alloc buffers are retired.
>> This is currently handle by calling flush_and_retire_stats for each
>> active buffer. Because this method is only implemented for
>> ParGCAllocBuffer and not for G1ParGCAllocBuffer we currently miss
>> updating the _retired field in G1ParGCAllocBuffer.
>> The _retired field is checked in a guarantee in the G1ParGCAllocBuffer
>> destructor, but this destructor is not usually called because we are
>> missing a virtual destructor for G1ParGCAllocator.
>> This patch adds this destructor and implements
>> G1ParGCAllocBuffer::flush_and_retire_stats by calling the version in
>> ParGCAllocBuffer and setting the _retired field to true.
> Change looks good.
> Just one question, would it make sense to remove G1ParGCAllocator and 
> move the _retired check into ParGCAllocator?
Probably, there is a RFE for that:

So I see that as a separate thing to do.

Thanks for reviewing,

> /Per

More information about the hotspot-gc-dev mailing list