# HG changeset patch # User tpivovarova # Date 1467200338 0 # Node ID 4756a101753fb1c6ee8252ba157aed4f6ef96b0a # Parent ae39135d10ecf1b92c4c8f9231ac6b2f355ad1d3# Parent 4027c9011ef1e877a3ee37b793f096441e215309 Merge diff -r ae39135d10ec -r 4756a101753f hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java --- a/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java Wed Jun 29 11:24:13 2016 +0000 +++ b/hotspot/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; diff -r ae39135d10ec -r 4756a101753f hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java --- a/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java Wed Jun 29 11:24:13 2016 +0000 +++ b/hotspot/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) {