# HG changeset patch # User Doug Simon # Date 1385806061 -3600 # Node ID ebdc13d9845d00fd119107b571c25825f6ed8469 # Parent bae0869c829a5d853a353dca8a3749717605463a replaced use of graal.compileTheWorldTest.log system property with a field to control CTW verbosity which is true by default but is set to false by CTW unit test diff -r bae0869c829a -r ebdc13d9845d graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java Sat Nov 30 01:48:18 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java Sat Nov 30 11:07:41 2013 +0100 @@ -39,7 +39,7 @@ boolean originalSetting = ExitVMOnException.getValue(); // Compile a couple classes in rt.jar String file = System.getProperty("java.home") + "/lib/rt.jar"; - new CompileTheWorld(file, 1, 5).compile(); + new CompileTheWorld(file, 1, 5, false).compile(); ExitVMOnException.setValue(originalSetting); } diff -r bae0869c829a -r ebdc13d9845d graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Sat Nov 30 01:48:18 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Sat Nov 30 11:07:41 2013 +0100 @@ -68,13 +68,15 @@ private int compiledMethodsCounter = 0; private long compileTime = 0; + private boolean verbose; + /** * Create a compile-the-world instance with default values from * {@link GraalOptions#CompileTheWorld}, {@link GraalOptions#CompileTheWorldStartAt} and * {@link GraalOptions#CompileTheWorldStopAt}. */ public CompileTheWorld() { - this(CompileTheWorld.getValue(), CompileTheWorldStartAt.getValue(), CompileTheWorldStopAt.getValue()); + this(CompileTheWorld.getValue(), CompileTheWorldStartAt.getValue(), CompileTheWorldStopAt.getValue(), true); } /** @@ -84,10 +86,11 @@ * @param startAt index of the class file to start compilation at * @param stopAt index of the class file to stop compilation at */ - public CompileTheWorld(String files, int startAt, int stopAt) { + public CompileTheWorld(String files, int startAt, int stopAt, boolean verbose) { this.files = files; this.startAt = startAt; this.stopAt = stopAt; + this.verbose = verbose; // We don't want the VM to exit when a method fails to compile... ExitVMOnException.setValue(false); @@ -127,18 +130,16 @@ } } - public static void println() { + public void println() { println(""); } - public static void println(String format, Object... args) { + public void println(String format, Object... args) { println(String.format(format, args)); } - public static final boolean LOG = Boolean.getBoolean("graal.compileTheWorldTest.log"); - - public static void println(String s) { - if (LOG) { + public void println(String s) { + if (verbose) { TTY.println(s); } }