RFR: 8077836: Make sure G1ParGCAllocBuffer are marked as retired
per.liden at oracle.com
Tue Apr 21 12:34:24 UTC 2015
On 2015-04-15 15:08, Stefan Johansson wrote:
> Please review this fix for:
> 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?
More information about the hotspot-gc-dev