# HG changeset patch # User Doug Simon # Date 1387300442 -3600 # Node ID 1480cfe9746290cda003dad9b17f5b93f6aed27c # Parent bfc5acea3c125f8101c48989332eed7c8239e900 CTWCompilationTask should not be removed from compilation queue diff -r bfc5acea3c12 -r 1480cfe97462 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 Tue Dec 17 17:09:22 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Dec 17 18:14:02 2013 +0100 @@ -104,7 +104,7 @@ public void run() { withinEnqueue.set(Boolean.FALSE); try { - runCompilation(); + runCompilation(true); } finally { if (method.currentTask() == this) { method.setCurrentTask(null); @@ -124,7 +124,7 @@ return providers.getSuites().getDefaultSuites(); } - public void runCompilation() { + public void runCompilation(boolean clearFromCompilationQueue) { /* * no code must be outside this try/finally because it could happen otherwise that * clearQueuedForCompilation() is not executed @@ -215,8 +215,10 @@ c2vm.notifyCompilationStatistics(id, method, entryBCI != INVOCATION_ENTRY_BCI, (int) processedBytes, time, timeUnitsPerSecond, installedCode); } - assert method.isQueuedForCompilation(); - method.clearQueuedForCompilation(); + if (clearFromCompilationQueue) { + assert method.isQueuedForCompilation(); + method.clearQueuedForCompilation(); + } } } diff -r bfc5acea3c12 -r 1480cfe97462 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Tue Dec 17 17:09:22 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java Tue Dec 17 18:14:02 2013 +0100 @@ -349,7 +349,7 @@ HotSpotBackend backend = runtime.getHostBackend(); PhasePlan phasePlan = vmToCompiler.createPhasePlan(backend.getProviders(), optimisticOpts, false); CompilationTask task = new CTWCompilationTask(backend, phasePlan, optimisticOpts, profilingInfo, method, INVOCATION_ENTRY_BCI, id); - task.runCompilation(); + task.runCompilation(false); compileTime += (System.currentTimeMillis() - start); compiledMethodsCounter++; diff -r bfc5acea3c12 -r 1480cfe97462 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 17 17:09:22 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Dec 17 18:14:02 2013 +0100 @@ -599,7 +599,7 @@ CompilationTask task = CompilationTask.create(backend, createPhasePlan(backend.getProviders(), optimisticOpts, osrCompilation), optimisticOpts, profilingInfo, method, entryBCI, id); if (blocking) { - task.runCompilation(); + task.runCompilation(true); } else { try { method.setCurrentTask(task);