changeset 21476:73713483b8ac

fixed npe in CompileTheWorld for methods that are already compiled
author Doug Simon <doug.simon@oracle.com>
date Sun, 24 May 2015 11:02:42 +0200
parents e538b5923ff0
children b1e712f66fe0
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Sun May 24 10:27:27 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Sun May 24 11:02:42 2015 +0200
@@ -173,14 +173,14 @@
         EventProvider eventProvider = Graal.getRequiredCapability(EventProvider.class);
         CompilationEvent compilationEvent = eventProvider.newCompilationEvent();
 
+        // 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;
+        }
+
         try (DebugCloseable a = CompilationTime.start()) {
-            // 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, isOSR);
             final boolean printCompilation = PrintCompilation.getValue() && !TTY.isSuppressed();
             if (printCompilation) {