src/hotspot/share/runtime/tieredThresholdPolicy.cpp
changeset 54736 1dc9bf9d016b
parent 54669 ad45b3802d4e
child 54983 81becad91321
--- a/src/hotspot/share/runtime/tieredThresholdPolicy.cpp	Tue May 07 07:44:15 2019 +0200
+++ b/src/hotspot/share/runtime/tieredThresholdPolicy.cpp	Tue May 07 09:17:03 2019 +0200
@@ -353,6 +353,16 @@
       TieredStopAtLevel > CompLevel_full_profile &&
       max_method != NULL && is_method_profiled(max_method)) {
     max_task->set_comp_level(CompLevel_limited_profile);
+
+    if (CompileBroker::compilation_is_complete(max_method, max_task->osr_bci(), CompLevel_limited_profile)) {
+      if (PrintTieredEvents) {
+        print_event(REMOVE_FROM_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());
+      }
+      compile_queue->remove_and_mark_stale(max_task);
+      max_method->clear_queued_for_compilation();
+      return NULL;
+    }
+
     if (PrintTieredEvents) {
       print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());
     }