changeset 13366:1480cfe97462

CTWCompilationTask should not be removed from compilation queue
author Doug Simon <doug.simon@oracle.com>
date Tue, 17 Dec 2013 18:14:02 +0100
parents bfc5acea3c12
children 413040ab993e
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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();
+            }
         }
     }
 
--- 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++;
--- 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);