Mercurial > hg > truffle
changeset 13200:ebdc13d9845d
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
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 30 Nov 2013 11:07:41 +0100 |
parents | bae0869c829a |
children | 8b14bab15757 c2deb575483c |
files | graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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); } }