Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java @ 14107:800057208a2c
enable C1 + Graal tiered
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 06 Mar 2014 17:11:39 -0800 |
parents | a38a54030ea2 |
children | 4eac66a9b87d |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Mar 06 22:45:25 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Mar 06 17:11:39 2014 -0800 @@ -212,11 +212,19 @@ long previousCompilationTime = CompilationTime.getCurrentValue(); HotSpotInstalledCode installedCode = null; try (TimerCloseable a = CompilationTime.start()) { - if (!tryToChangeStatus(CompilationStatus.Queued, CompilationStatus.Running) || method.hasCompiledCode()) { + if (!tryToChangeStatus(CompilationStatus.Queued, CompilationStatus.Running)) { + return; + } + boolean isOSR = entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI; + + // If there is already compiled code for this method on our level we simply return. + // Graal compiles are always at the highest compile level, even in non-tiered mode so we + // only need to check for that value. + if (method.hasCodeAtLevel(entryBCI, config.compilationLevelFullOptimization)) { return; } - CompilationStatistics stats = CompilationStatistics.create(method, entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI); + CompilationStatistics stats = CompilationStatistics.create(method, isOSR); final boolean printCompilation = PrintCompilation.getValue() && !TTY.isSuppressed(); if (printCompilation) { TTY.println(getMethodDescription() + "...");