src/hotspot/share/runtime/tieredThresholdPolicy.cpp
changeset 53193 184c51e48260
parent 52934 8deeb7bba516
child 53195 9fff411880fb
equal deleted inserted replaced
53192:0042eb88035b 53193:184c51e48260
     1 /*
     1 /*
     2  * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   870 #endif
   870 #endif
   871   return next_level;
   871   return next_level;
   872 }
   872 }
   873 
   873 
   874 bool TieredThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread) {
   874 bool TieredThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread) {
   875   if (UseAOT && !delay_compilation_during_startup()) {
   875   if (UseAOT) {
   876     if (cur_level == CompLevel_full_profile || cur_level == CompLevel_none) {
   876     if (cur_level == CompLevel_full_profile || cur_level == CompLevel_none) {
   877       // If the current level is full profile or interpreter and we're switching to any other level,
   877       // If the current level is full profile or interpreter and we're switching to any other level,
   878       // activate the AOT code back first so that we won't waste time overprofiling.
   878       // activate the AOT code back first so that we won't waste time overprofiling.
   879       compile(mh, InvocationEntryBci, CompLevel_aot, thread);
   879       compile(mh, InvocationEntryBci, CompLevel_aot, thread);
   880       // Fall through for JIT compilation.
   880       // Fall through for JIT compilation.