<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Tom,<div><br><div><div>On Aug 5, 2015, at 10:33 AM, Tom Benson <<a href="mailto:tom.benson@oracle.com">tom.benson@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>On 8/5/2015 10:38 AM, Thomas Schatzl wrote:<br><blockquote type="cite">Hi,<br><br>On Wed, 2015-08-05 at 10:29 -0400, Tom Benson wrote:<br><br><blockquote type="cite">These restore-time routines (alloc_/free_ archive regions) are called at<br>the beginning of JVM init, not at a safepoint.  The dump-time archive<br>alloc routines (such as archive_mem_allocate) do check for safepoint<br>context.<br></blockquote>Sigh. Is there a way to check this reliably?<br></blockquote>I notice that cms/compactibleFreeListSpace.cpp contains the assertion:<br><br>  assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),<br>         "Else races are possible");<br><br>... 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.<br></blockquote><div><br></div><div>The mapping and initialization of the CDS string data happens during VM initialization and before '<font face="Menlo"><span style="font-size: 11px;">set_init_completed()’ is called. Just verified that in gdb as well.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Thanks,</span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Jiangli</span></font></div><br><blockquote type="cite">Tom<br><br><blockquote type="cite"><br>As mentioned, at least the decrement_used() call is not guarded against<br>concurrent modification. It is probably easier for now to guard against<br>using these methods at the wrong time (in case somebody wants to try<br>them if some other requirement comes up) instead of trying to make them<br>MT safe.<br><br>Thanks,<br>   Thomas<br><br><br></blockquote><br></blockquote></div><br></div></body></html>