Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java @ 9864:063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 04 Jun 2013 17:33:14 +0200 |
parents | e876c2a6954f |
children | fbad7372eccd |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jun 04 15:42:42 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jun 04 17:33:14 2013 +0200 @@ -24,6 +24,7 @@ import static com.oracle.graal.api.code.CodeUtil.*; import static com.oracle.graal.nodes.StructuredGraph.*; +import static com.oracle.graal.phases.GraalOptions.*; import java.lang.reflect.*; import java.util.concurrent.*; @@ -114,7 +115,7 @@ return; } inProgress = true; - if (GraalOptions.DynamicCompilePriority) { + if (DynamicCompilePriority.getValue()) { int threadPriority = priority < SlowQueueCutoff.getValue() ? Thread.NORM_PRIORITY : Thread.MIN_PRIORITY; if (Thread.currentThread().getPriority() != threadPriority) { Thread.currentThread().setPriority(threadPriority); @@ -139,17 +140,17 @@ public void runCompilation() { CompilationStatistics stats = CompilationStatistics.create(method, entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI); try (TimerCloseable a = CompilationTime.start()) { - final boolean printCompilation = GraalOptions.PrintCompilation && !TTY.isSuppressed(); + final boolean printCompilation = PrintCompilation.getValue() && !TTY.isSuppressed(); if (printCompilation) { TTY.println(String.format("%-6d Graal %-70s %-45s %-50s %s...", id, method.getDeclaringClass().getName(), method.getName(), method.getSignature(), entryBCI == StructuredGraph.INVOCATION_ENTRY_BCI ? "" : "(OSR@" + entryBCI + ") ")); } - if (GraalOptions.HotSpotPrintCompilation) { + if (HotSpotPrintCompilation.getValue()) { printCompilation(); } CompilationResult result = null; - TTY.Filter filter = new TTY.Filter(GraalOptions.PrintFilter, method); + TTY.Filter filter = new TTY.Filter(PrintFilter.getValue(), method); long start = System.currentTimeMillis(); try { result = Debug.scope("Compiling", new DebugDumpScope(String.valueOf(id), true), new Callable<CompilationResult>() { @@ -182,19 +183,19 @@ installMethod(result); } catch (BailoutException bailout) { Debug.metric("Bailouts").increment(); - if (GraalOptions.ExitVMOnBailout) { + if (ExitVMOnBailout.getValue()) { TTY.cachedOut.println(MetaUtil.format("Bailout in %H.%n(%p)", method)); bailout.printStackTrace(TTY.cachedOut); System.exit(-1); - } else if (GraalOptions.PrintBailout) { + } else if (PrintBailout.getValue()) { TTY.cachedOut.println(MetaUtil.format("Bailout in %H.%n(%p)", method)); bailout.printStackTrace(TTY.cachedOut); } } catch (Throwable t) { - if (GraalOptions.PrintStackTraceOnException || GraalOptions.ExitVMOnException) { + if (PrintStackTraceOnException.getValue() || ExitVMOnException.getValue()) { t.printStackTrace(TTY.cachedOut); } - if (GraalOptions.ExitVMOnException) { + if (ExitVMOnException.getValue()) { System.exit(-1); } }