RFR (S): 8131734: Add free_archive_regions support to G1 for -Xshared:auto

Jiangli Zhou jiangli.zhou at oracle.com
Wed Aug 5 18:05:18 UTC 2015


Hi Tom,

On Aug 5, 2015, at 10:33 AM, Tom Benson <tom.benson at oracle.com> wrote:

> Hi,
> 
> On 8/5/2015 10:38 AM, Thomas Schatzl wrote:
>> Hi,
>> 
>> 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
>>> context.
>> 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.

The mapping and initialization of the CDS string data happens during VM initialization and before 'set_init_completed()’ is called. Just verified that in gdb as well.

Thanks,
Jiangli

> Tom
> 
>> 
>> 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.
>> 
>> Thanks,
>>   Thomas
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20150805/6a40ca2c/attachment.html>


More information about the hotspot-gc-dev mailing list