# HG changeset patch # User twisti # Date 1386732235 28800 # Node ID 4a6787110408be31957b6b0a29d47ff0ee7a0626 # Parent fbcdae53b17e2fc76e2577f6f11199f081b03077 added PrintBootstrap option diff -r fbcdae53b17e -r 4a6787110408 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Dec 10 22:09:27 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Dec 10 19:23:55 2013 -0800 @@ -65,6 +65,9 @@ @Option(help = "Print compilation queue activity periodically") private static final OptionValue PrintQueue = new OptionValue<>(false); + @Option(help = "Print bootstrap progress and summary") + private static final OptionValue PrintBootstrap = new OptionValue<>(true); + @Option(help = "Time limit in milliseconds for bootstrap (-1 for no limit)") private static final OptionValue TimedBootstrap = new OptionValue<>(-1); @@ -226,8 +229,11 @@ } public void bootstrap() throws Throwable { - TTY.print("Bootstrapping Graal"); - TTY.flush(); + if (PrintBootstrap.getValue()) { + TTY.print("Bootstrapping Graal"); + TTY.flush(); + } + long startTime = System.currentTimeMillis(); boolean firstRun = true; @@ -261,8 +267,10 @@ Thread.sleep(100); while (z < compileQueue.getCompletedTaskCount() / 100) { ++z; - TTY.print("."); - TTY.flush(); + if (PrintBootstrap.getValue()) { + TTY.print("."); + TTY.flush(); + } } // Are we out of time? @@ -283,7 +291,10 @@ bootstrapRunning = false; - TTY.println(" in %d ms (compiled %d methods)", System.currentTimeMillis() - startTime, compileQueue.getCompletedTaskCount()); + if (PrintBootstrap.getValue()) { + TTY.println(" in %d ms (compiled %d methods)", System.currentTimeMillis() - startTime, compileQueue.getCompletedTaskCount()); + } + if (runtime.getGraphCache() != null) { runtime.getGraphCache().clear(); }