RFR: 8214118: HeapRegions marked as archive even if CDS mapping fails
thomas.schatzl at oracle.com
Wed Nov 21 20:29:23 UTC 2018
On Wed, 2018-11-21 at 15:43 +0100, Stefan Johansson wrote:
> Please review this fix to avoid leaving heap metadata in an
> inconsistent state when CDS archive mapping fails.
> Issue: https://bugs.openjdk.java.net/browse/JDK-8214118
> Webrev: http://cr.openjdk.java.net/~sjohanss/8214118/00/
the change seems good. I have two comments on this though:
- would it be useful to clear both maps in
G1ArchiveAllocator::clear_range_archive()? I mean in the failure case
these regions can't be used for one purpose or the other as soon as we
fail the mapping, and saves passing the bool flag.
- this is a cleanup request for the future: is there a reason to have
separate tables for open and closed archives? I understand that the
code happened this way because these types of archives were added at
different times, but in my understanding a region in that table can
either be one or the other, and by using a uint8_t as per-region entry
we can even save space.
More information about the hotspot-dev