RFR (S): 8131734: Add free_archive_regions support to G1 for -Xshared:auto
tom.benson at oracle.com
Tue Aug 4 18:25:40 UTC 2015
Please review this change for JDK-8131734, an addition to the Archive
Region support in G1 to handle -Xshared:auto behavior. With
Xshared:auto, if the shared string region file mapping fails, sharing is
disabled and execution continues. To allow this, the archive region
space which has already been allocated needs to be freed. A
free_archive_regions() entry is added to g1CollectedHeap, to be called
if the file mapping performed by CDS fails. Its arguments are the same
as those given to alloc_archive_regions (and that would have been given
to fill_archive_regions if the mapping had succeeded).
The CDS code change will be posted separately by Jiangli Zhou.
Tested: JPRT, and benchmarks run with alloc/free_archive_regions calls
forced at init time and heap verification enabled.
Jiangli also tried this with the failing Xshared:auto test and the
corresponding CDS code change to call free_archive_regions.
More information about the hotspot-gc-dev