# HG changeset patch # User Doug Simon # Date 1432458162 -7200 # Node ID 73713483b8ac9bce45ca3c3c409abfb6eb5f98a8 # Parent e538b5923ff08ff6a3b5091e23d7c6c36c9e6e69 fixed npe in CompileTheWorld for methods that are already compiled diff -r e538b5923ff0 -r 73713483b8ac graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- 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) {