changeset 11686:67227207fefe

Merge
author tpivovarova
date Wed, 29 Jun 2016 11:38:58 +0000
parents a33fdf85eb95 43d8e757f899
children 8a6cce0bc360
files
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java	Wed Jun 29 11:24:13 2016 +0000
+++ b/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java	Wed Jun 29 11:38:58 2016 +0000
@@ -68,6 +68,11 @@
             if (Utils.COMPILE_THE_WORLD_PRELOAD_CLASSES) {
                 preloadClasses(aClass.getName(), id, constantPool);
             }
+            int startLevel = Utils.INITIAL_COMP_LEVEL;
+            int endLevel = Utils.TIERED_COMPILATION ? Utils.TIERED_STOP_AT_LEVEL : startLevel;
+            for (int i = startLevel; i <= endLevel; ++i) {
+                WHITE_BOX.enqueueInitializerForCompilation(aClass, i);
+            }
             long methodCount = 0;
             for (Executable e : aClass.getDeclaredConstructors()) {
                 ++methodCount;
--- a/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java	Wed Jun 29 11:24:13 2016 +0000
+++ b/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java	Wed Jun 29 11:38:58 2016 +0000
@@ -40,6 +40,7 @@
  * Concrete subclasses should implement method {@link #process()}.
  */
 public abstract class PathHandler {
+    private static final Unsafe UNSAFE = jdk.test.lib.Utils.getUnsafe();
     private static final AtomicLong CLASS_COUNT = new AtomicLong(0L);
     private static volatile boolean CLASSES_LIMIT_REACHED = false;
     private static final Pattern JAR_IN_DIR_PATTERN
@@ -151,6 +152,7 @@
         if (id >= Utils.COMPILE_THE_WORLD_START_AT) {
             try {
                 Class<?> aClass = loader.loadClass(name);
+                UNSAFE.ensureClassInitialized(aClass);
                 CompileTheWorld.OUT.printf("[%d]\t%s%n", id, name);
                 Compiler.compileClass(aClass, id, executor);
             } catch (ClassNotFoundException e) {