RFR: 8077836: Make sure G1ParGCAllocBuffer are marked as retired
Stefan Johansson
stefan.johansson at oracle.com
Wed Apr 15 13:08:24 UTC 2015
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.
Testing:
Manual verification that G1 always fails with the new destructor and
that the fix avoids this.
Thanks,
Stefan
More information about the hotspot-gc-dev
mailing list