RFR (S): 8131734: Add free_archive_regions support to G1 for -Xshared:auto
tom.benson at oracle.com
Wed Aug 5 17:33:51 UTC 2015
On 8/5/2015 10:38 AM, Thomas Schatzl wrote:
> On Wed, 2015-08-05 at 10:29 -0400, Tom Benson wrote:
>> These restore-time routines (alloc_/free_ archive regions) are called at
>> the beginning of JVM init, not at a safepoint. The dump-time archive
>> alloc routines (such as archive_mem_allocate) do check for safepoint
> Sigh. Is there a way to check this reliably?
I notice that cms/compactibleFreeListSpace.cpp contains the assertion:
assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
"Else races are possible");
... so perhaps that's a viable option. I'll try it to ensure the CDS
use does indeed occur while is_init_completed() is false.
> As mentioned, at least the decrement_used() call is not guarded against
> concurrent modification. It is probably easier for now to guard against
> using these methods at the wrong time (in case somebody wants to try
> them if some other requirement comes up) instead of trying to make them
> MT safe.
More information about the hotspot-gc-dev