Done, filed https://bugs.openjdk.java.net/browse/JDK-8175079 and pushed a fix which also cleans up the hack in System.initPhase3.

/Claes

On 02/16/2017 05:17 PM, Alan Bateman wrote:
Make sense for now, you can also change System.initPhase3 is not trigger eager initialization. I guess the rmid tests must be disabled as otherwise this would have been noticed, it's the odd man because it sets the security manager in its main method rather than on the command line.

-Alan

On 16/02/2017 16:11, Claes Redestad wrote:
Yes, verified that reverting to eager initialization of the system image reader avoids this issue. I guess we need to back this optimization out and see if we can improve things in the future:

diff -r 32cb9898b630 src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java --- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java Thu Feb 16 17:05:48 2017 +0100 +++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java Thu Feb 16 17:08:12 2017 +0100
@@ -115,12 +115,7 @@
         long t0 = System.nanoTime();

         // system modules (may be patched)
-        ModuleFinder systemModules;
-        if (SystemModules.MODULE_NAMES.length > 0) {
-            systemModules = SystemModuleFinder.getInstance();
-        } else {
-            systemModules = ModuleFinder.ofSystem();
-        }
+        ModuleFinder systemModules = ModuleFinder.ofSystem();

         PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);


Reply via email to