1.1 --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp Thu Sep 05 18:40:52 2019 +0800 1.2 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp Thu Sep 05 18:52:27 2019 +0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -196,6 +196,16 @@ 1.11 1.12 if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile 1.13 && is_method_profiled(max_method)) { 1.14 + 1.15 + if (CompileBroker::compilation_is_complete(max_method, max_task->osr_bci(), CompLevel_limited_profile)) { 1.16 + if (PrintTieredEvents) { 1.17 + print_event(REMOVE_FROM_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level()); 1.18 + } 1.19 + compile_queue->remove_and_mark_stale(max_task); 1.20 + max_method->clear_queued_for_compilation(); 1.21 + return NULL; 1.22 + } 1.23 + 1.24 max_task->set_comp_level(CompLevel_limited_profile); 1.25 if (PrintTieredEvents) { 1.26 print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());