< prev index next >

test/testlibrary/ctw/src/sun/hotspot/tools/ctw/CompileTheWorld.java

Print this page
rev 12487 : 8172149: CTW library should call System::exit
Reviewed-by:

*** 57,66 **** --- 57,68 ---- } if (os != null) { OUT = os; } + boolean passed = false; + try { try { if (ManagementFactory.getCompilationMXBean() == null) { throw new RuntimeException( "CTW can not work in interpreted mode");
*** 82,95 **** } CompileTheWorld.OUT.printf("Done (%d classes, %d methods, %d ms)%n", PathHandler.getClassCount(), Compiler.getMethodCount(), System.currentTimeMillis() - start); } finally { ! if (os != null) { ! os.close(); ! } } } private static ExecutorService createExecutor() { final int threadsCount = Math.min( --- 84,97 ---- } CompileTheWorld.OUT.printf("Done (%d classes, %d methods, %d ms)%n", PathHandler.getClassCount(), Compiler.getMethodCount(), System.currentTimeMillis() - start); + passed = true; } finally { ! // <clinit> might have started new threads ! System.exit(passed ? 0 : 1); } } private static ExecutorService createExecutor() { final int threadsCount = Math.min(
< prev index next >