annotate hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp @ 36556:7f092a7ce938

8150839: Adjust the number of compiler threads for 32-bit platforms Summary: Set the number of compiler threads to 3 on 32-bit platforms. Reviewed-by: iveresov
author zmajo
date Fri, 04 Mar 2016 08:53:59 +0100
parents 0ee84aa8e705
children c4e7456d6ae1
rev   line source
iveresov@6453 1 /*
coleenp@33593 2 * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
iveresov@6453 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
iveresov@6453 4 *
iveresov@6453 5 * This code is free software; you can redistribute it and/or modify it
iveresov@6453 6 * under the terms of the GNU General Public License version 2 only, as
iveresov@6453 7 * published by the Free Software Foundation.
iveresov@6453 8 *
iveresov@6453 9 * This code is distributed in the hope that it will be useful, but WITHOUT
iveresov@6453 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
iveresov@6453 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
iveresov@6453 12 * version 2 for more details (a copy is included in the LICENSE file that
iveresov@6453 13 * accompanied this code).
iveresov@6453 14 *
iveresov@6453 15 * You should have received a copy of the GNU General Public License version
iveresov@6453 16 * 2 along with this work; if not, write to the Free Software Foundation,
iveresov@6453 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
iveresov@6453 18 *
iveresov@6453 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
iveresov@6453 20 * or visit www.oracle.com if you need additional information or have any
iveresov@6453 21 * questions.
iveresov@6453 22 *
iveresov@6453 23 */
iveresov@6453 24
stefank@7397 25 #include "precompiled.hpp"
stefank@7397 26 #include "compiler/compileBroker.hpp"
stefank@7397 27 #include "memory/resourceArea.hpp"
stefank@7397 28 #include "runtime/arguments.hpp"
stefank@7397 29 #include "runtime/simpleThresholdPolicy.hpp"
stefank@7397 30 #include "runtime/simpleThresholdPolicy.inline.hpp"
iveresov@8322 31 #include "code/scopeDesc.hpp"
iveresov@6453 32
iveresov@11192 33
iveresov@11192 34 void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh) {
iveresov@11192 35 int invocation_count = mh->invocation_count();
iveresov@11192 36 int backedge_count = mh->backedge_count();
coleenp@13728 37 MethodData* mdh = mh->method_data();
iveresov@11192 38 int mdo_invocations = 0, mdo_backedges = 0;
iveresov@11192 39 int mdo_invocations_start = 0, mdo_backedges_start = 0;
coleenp@13728 40 if (mdh != NULL) {
iveresov@11192 41 mdo_invocations = mdh->invocation_count();
iveresov@11192 42 mdo_backedges = mdh->backedge_count();
iveresov@11192 43 mdo_invocations_start = mdh->invocation_count_start();
iveresov@11192 44 mdo_backedges_start = mdh->backedge_count_start();
iveresov@11192 45 }
twisti@13891 46 tty->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix,
iveresov@11192 47 invocation_count, backedge_count, prefix,
iveresov@11192 48 mdo_invocations, mdo_invocations_start,
iveresov@11192 49 mdo_backedges, mdo_backedges_start);
twisti@13891 50 tty->print(" %smax levels=%d,%d", prefix,
iveresov@11192 51 mh->highest_comp_level(), mh->highest_osr_comp_level());
iveresov@11192 52 }
iveresov@11192 53
iveresov@6453 54 // Print an event.
iveresov@6453 55 void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh,
iveresov@6453 56 int bci, CompLevel level) {
iveresov@6453 57 bool inlinee_event = mh() != imh();
iveresov@6453 58
iveresov@6453 59 ttyLocker tty_lock;
iveresov@6453 60 tty->print("%lf: [", os::elapsedTime());
iveresov@6453 61
iveresov@6453 62 switch(type) {
iveresov@6453 63 case CALL:
iveresov@6453 64 tty->print("call");
iveresov@6453 65 break;
iveresov@6453 66 case LOOP:
iveresov@6453 67 tty->print("loop");
iveresov@6453 68 break;
iveresov@6453 69 case COMPILE:
iveresov@6453 70 tty->print("compile");
iveresov@8322 71 break;
iveresov@10014 72 case REMOVE_FROM_QUEUE:
iveresov@10014 73 tty->print("remove-from-queue");
iveresov@8322 74 break;
iveresov@10014 75 case UPDATE_IN_QUEUE:
iveresov@10014 76 tty->print("update-in-queue");
iveresov@8322 77 break;
iveresov@8322 78 case REPROFILE:
iveresov@8322 79 tty->print("reprofile");
iveresov@8322 80 break;
iveresov@10014 81 case MAKE_NOT_ENTRANT:
iveresov@10014 82 tty->print("make-not-entrant");
iveresov@10014 83 break;
iveresov@8322 84 default:
iveresov@8322 85 tty->print("unknown");
iveresov@6453 86 }
iveresov@6453 87
twisti@13891 88 tty->print(" level=%d ", level);
iveresov@6453 89
iveresov@6453 90 ResourceMark rm;
iveresov@6453 91 char *method_name = mh->name_and_sig_as_C_string();
iveresov@6453 92 tty->print("[%s", method_name);
iveresov@6453 93 if (inlinee_event) {
iveresov@6453 94 char *inlinee_name = imh->name_and_sig_as_C_string();
iveresov@6453 95 tty->print(" [%s]] ", inlinee_name);
iveresov@6453 96 }
iveresov@6453 97 else tty->print("] ");
twisti@13891 98 tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
twisti@13891 99 CompileBroker::queue_size(CompLevel_full_optimization));
iveresov@6453 100
iveresov@6453 101 print_specific(type, mh, imh, bci, level);
iveresov@6453 102
iveresov@6453 103 if (type != COMPILE) {
iveresov@11192 104 print_counters("", mh);
iveresov@6453 105 if (inlinee_event) {
iveresov@11192 106 print_counters("inlinee ", imh);
iveresov@6453 107 }
twisti@13891 108 tty->print(" compilable=");
iveresov@6453 109 bool need_comma = false;
iveresov@6453 110 if (!mh->is_not_compilable(CompLevel_full_profile)) {
iveresov@6453 111 tty->print("c1");
iveresov@6453 112 need_comma = true;
iveresov@6453 113 }
twisti@13891 114 if (!mh->is_not_osr_compilable(CompLevel_full_profile)) {
twisti@13891 115 if (need_comma) tty->print(",");
twisti@13891 116 tty->print("c1-osr");
twisti@13891 117 need_comma = true;
twisti@13891 118 }
iveresov@6453 119 if (!mh->is_not_compilable(CompLevel_full_optimization)) {
twisti@13891 120 if (need_comma) tty->print(",");
iveresov@6453 121 tty->print("c2");
iveresov@6453 122 need_comma = true;
iveresov@6453 123 }
twisti@13891 124 if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
twisti@13891 125 if (need_comma) tty->print(",");
twisti@13891 126 tty->print("c2-osr");
iveresov@6453 127 }
twisti@13891 128 tty->print(" status=");
iveresov@6453 129 if (mh->queued_for_compilation()) {
twisti@13891 130 tty->print("in-queue");
twisti@13891 131 } else tty->print("idle");
iveresov@6453 132 }
iveresov@6453 133 tty->print_cr("]");
iveresov@6453 134 }
iveresov@6453 135
iveresov@6453 136 void SimpleThresholdPolicy::initialize() {
iveresov@6453 137 if (FLAG_IS_DEFAULT(CICompilerCount)) {
iveresov@6453 138 FLAG_SET_DEFAULT(CICompilerCount, 3);
iveresov@6453 139 }
iveresov@6453 140 int count = CICompilerCount;
zmajo@36556 141 #ifdef _LP64
zmajo@36556 142 // On 64-bit systems, scale the number of compiler threads with
zmajo@36556 143 // the number of cores available on the system. Scaling is not
zmajo@36556 144 // performed on 32-bit systems because it can lead to exhaustion
zmajo@36556 145 // of the virtual memory address space available to the JVM.
iveresov@6453 146 if (CICompilerCountPerCPU) {
iveresov@6453 147 count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
iveresov@6453 148 }
zmajo@36556 149 #endif
iveresov@6453 150 set_c1_count(MAX2(count / 3, 1));
anoll@24013 151 set_c2_count(MAX2(count - c1_count(), 1));
anoll@24013 152 FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
iveresov@6453 153 }
iveresov@6453 154
iveresov@6453 155 void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
iveresov@6453 156 if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
iveresov@6453 157 counter->set_carry_flag();
iveresov@6453 158 }
iveresov@6453 159 }
iveresov@6453 160
iveresov@6453 161 // Set carry flags on the counters if necessary
coleenp@13728 162 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
jiangli@17000 163 MethodCounters *mcs = method->method_counters();
jiangli@17130 164 if (mcs != NULL) {
jiangli@17130 165 set_carry_if_necessary(mcs->invocation_counter());
jiangli@17130 166 set_carry_if_necessary(mcs->backedge_counter());
jiangli@17130 167 }
coleenp@13728 168 MethodData* mdo = method->method_data();
iveresov@6453 169 if (mdo != NULL) {
iveresov@6453 170 set_carry_if_necessary(mdo->invocation_counter());
iveresov@6453 171 set_carry_if_necessary(mdo->backedge_counter());
iveresov@6453 172 }
iveresov@6453 173 }
iveresov@6453 174
iveresov@6453 175 // Called with the queue locked and with at least one element
iveresov@6453 176 CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) {
dnsimon@35547 177 return select_task_helper(compile_queue);
iveresov@6453 178 }
iveresov@6453 179
iveresov@8322 180 void SimpleThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {
iveresov@8322 181 for (ScopeDesc* sd = trap_scope;; sd = sd->sender()) {
iveresov@8322 182 if (PrintTieredEvents) {
iveresov@8322 183 methodHandle mh(sd->method());
iveresov@8322 184 print_event(REPROFILE, mh, mh, InvocationEntryBci, CompLevel_none);
iveresov@8322 185 }
coleenp@13728 186 MethodData* mdo = sd->method()->method_data();
iveresov@8322 187 if (mdo != NULL) {
iveresov@8322 188 mdo->reset_start_counters();
iveresov@8322 189 }
iveresov@8322 190 if (sd->is_top()) break;
iveresov@8322 191 }
iveresov@8322 192 }
iveresov@8322 193
coleenp@33593 194 nmethod* SimpleThresholdPolicy::event(const methodHandle& method, const methodHandle& inlinee,
iveresov@11572 195 int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread) {
iveresov@6453 196 if (comp_level == CompLevel_none &&
iveresov@11572 197 JvmtiExport::can_post_interpreter_events() &&
iveresov@11572 198 thread->is_interp_only_mode()) {
iveresov@11572 199 return NULL;
iveresov@6453 200 }
kvn@24324 201 if (CompileTheWorld || ReplayCompiles) {
kvn@24324 202 // Don't trigger other compiles in testing mode
kvn@24324 203 return NULL;
kvn@24324 204 }
iveresov@6453 205
iveresov@6453 206 handle_counter_overflow(method());
iveresov@6453 207 if (method() != inlinee()) {
iveresov@6453 208 handle_counter_overflow(inlinee());
iveresov@6453 209 }
iveresov@6453 210
iveresov@6453 211 if (PrintTieredEvents) {
iveresov@6453 212 print_event(bci == InvocationEntryBci ? CALL : LOOP, method, inlinee, bci, comp_level);
iveresov@6453 213 }
iveresov@6453 214
iveresov@6453 215 if (bci == InvocationEntryBci) {
iveresov@11572 216 method_invocation_event(method, inlinee, comp_level, nm, thread);
iveresov@6453 217 } else {
thartmann@27447 218 // method == inlinee if the event originated in the main method
iveresov@11572 219 method_back_branch_event(method, inlinee, bci, comp_level, nm, thread);
thartmann@27447 220 // Check if event led to a higher level OSR compilation
thartmann@27447 221 nmethod* osr_nm = inlinee->lookup_osr_nmethod_for(bci, comp_level, false);
thartmann@27447 222 if (osr_nm != NULL && osr_nm->comp_level() > comp_level) {
thartmann@27447 223 // Perform OSR with new nmethod
thartmann@27447 224 return osr_nm;
iveresov@6453 225 }
iveresov@6453 226 }
thartmann@27447 227 return NULL;
iveresov@6453 228 }
iveresov@6453 229
iveresov@6453 230 // Check if the method can be compiled, change level if necessary
coleenp@33593 231 void SimpleThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
iveresov@10250 232 assert(level <= TieredStopAtLevel, "Invalid compilation level");
iveresov@6453 233 if (level == CompLevel_none) {
iveresov@6453 234 return;
iveresov@6453 235 }
iveresov@7389 236 // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
iveresov@7389 237 // in the interpreter and then compile with C2 (the transition function will request that,
iveresov@7389 238 // see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
iveresov@7389 239 // pure C1.
iveresov@6453 240 if (!can_be_compiled(mh, level)) {
iveresov@6453 241 if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) {
iveresov@11572 242 compile(mh, bci, CompLevel_simple, thread);
iveresov@6453 243 }
iveresov@6453 244 return;
iveresov@6453 245 }
twisti@13891 246 if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) {
iveresov@6453 247 return;
iveresov@6453 248 }
anoll@24321 249 if (!CompileBroker::compilation_is_in_queue(mh)) {
iveresov@10250 250 if (PrintTieredEvents) {
iveresov@10250 251 print_event(COMPILE, mh, mh, bci, level);
iveresov@10250 252 }
iveresov@11572 253 submit_compile(mh, bci, level, thread);
iveresov@6453 254 }
iveresov@6453 255 }
iveresov@6453 256
iveresov@6453 257 // Tell the broker to compile the method
coleenp@33593 258 void SimpleThresholdPolicy::submit_compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
iveresov@6453 259 int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
iveresov@11572 260 CompileBroker::compile_method(mh, bci, level, mh, hot_count, "tiered", thread);
iveresov@6453 261 }
iveresov@6453 262
iveresov@6453 263 // Call and loop predicates determine whether a transition to a higher
iveresov@6453 264 // compilation level should be performed (pointers to predicate functions
iveresov@6453 265 // are passed to common() transition function).
zmajo@28650 266 bool SimpleThresholdPolicy::loop_predicate(int i, int b, CompLevel cur_level, Method* method) {
iveresov@6453 267 switch(cur_level) {
iveresov@6453 268 case CompLevel_none:
iveresov@6453 269 case CompLevel_limited_profile: {
zmajo@28650 270 return loop_predicate_helper<CompLevel_none>(i, b, 1.0, method);
iveresov@6453 271 }
iveresov@6453 272 case CompLevel_full_profile: {
zmajo@28650 273 return loop_predicate_helper<CompLevel_full_profile>(i, b, 1.0, method);
iveresov@6453 274 }
iveresov@6453 275 default:
iveresov@6453 276 return true;
iveresov@6453 277 }
iveresov@6453 278 }
iveresov@6453 279
zmajo@28650 280 bool SimpleThresholdPolicy::call_predicate(int i, int b, CompLevel cur_level, Method* method) {
iveresov@6453 281 switch(cur_level) {
iveresov@6453 282 case CompLevel_none:
iveresov@6453 283 case CompLevel_limited_profile: {
zmajo@28650 284 return call_predicate_helper<CompLevel_none>(i, b, 1.0, method);
iveresov@6453 285 }
iveresov@6453 286 case CompLevel_full_profile: {
zmajo@28650 287 return call_predicate_helper<CompLevel_full_profile>(i, b, 1.0, method);
iveresov@6453 288 }
iveresov@6453 289 default:
iveresov@6453 290 return true;
iveresov@6453 291 }
iveresov@6453 292 }
iveresov@6453 293
iveresov@6453 294 // Determine is a method is mature.
coleenp@13728 295 bool SimpleThresholdPolicy::is_mature(Method* method) {
iveresov@6453 296 if (is_trivial(method)) return true;
coleenp@13728 297 MethodData* mdo = method->method_data();
iveresov@6453 298 if (mdo != NULL) {
iveresov@6453 299 int i = mdo->invocation_count();
iveresov@6453 300 int b = mdo->backedge_count();
iveresov@6453 301 double k = ProfileMaturityPercentage / 100.0;
zmajo@28650 302 return call_predicate_helper<CompLevel_full_profile>(i, b, k, method) ||
zmajo@28650 303 loop_predicate_helper<CompLevel_full_profile>(i, b, k, method);
iveresov@6453 304 }
iveresov@6453 305 return false;
iveresov@6453 306 }
iveresov@6453 307
iveresov@6453 308 // Common transition function. Given a predicate determines if a method should transition to another level.
coleenp@13728 309 CompLevel SimpleThresholdPolicy::common(Predicate p, Method* method, CompLevel cur_level) {
iveresov@6453 310 CompLevel next_level = cur_level;
iveresov@6453 311 int i = method->invocation_count();
iveresov@6453 312 int b = method->backedge_count();
iveresov@6453 313
iveresov@10250 314 if (is_trivial(method)) {
iveresov@10250 315 next_level = CompLevel_simple;
iveresov@10250 316 } else {
iveresov@10250 317 switch(cur_level) {
iveresov@10250 318 case CompLevel_none:
iveresov@10250 319 // If we were at full profile level, would we switch to full opt?
iveresov@10250 320 if (common(p, method, CompLevel_full_profile) == CompLevel_full_optimization) {
iveresov@10250 321 next_level = CompLevel_full_optimization;
zmajo@28650 322 } else if ((this->*p)(i, b, cur_level, method)) {
iveresov@10250 323 next_level = CompLevel_full_profile;
iveresov@10250 324 }
iveresov@10250 325 break;
iveresov@10250 326 case CompLevel_limited_profile:
iveresov@10250 327 case CompLevel_full_profile:
iveresov@10250 328 {
coleenp@13728 329 MethodData* mdo = method->method_data();
iveresov@10250 330 if (mdo != NULL) {
iveresov@10250 331 if (mdo->would_profile()) {
iveresov@10250 332 int mdo_i = mdo->invocation_count_delta();
iveresov@10250 333 int mdo_b = mdo->backedge_count_delta();
zmajo@28650 334 if ((this->*p)(mdo_i, mdo_b, cur_level, method)) {
iveresov@10250 335 next_level = CompLevel_full_optimization;
iveresov@10250 336 }
iveresov@10250 337 } else {
iveresov@8322 338 next_level = CompLevel_full_optimization;
iveresov@8322 339 }
iveresov@6453 340 }
iveresov@6453 341 }
iveresov@10250 342 break;
iveresov@6453 343 }
iveresov@6453 344 }
iveresov@10250 345 return MIN2(next_level, (CompLevel)TieredStopAtLevel);
iveresov@6453 346 }
iveresov@6453 347
iveresov@6453 348 // Determine if a method should be compiled with a normal entry point at a different level.
coleenp@13728 349 CompLevel SimpleThresholdPolicy::call_event(Method* method, CompLevel cur_level) {
iveresov@10013 350 CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),
iveresov@10013 351 common(&SimpleThresholdPolicy::loop_predicate, method, cur_level));
iveresov@6453 352 CompLevel next_level = common(&SimpleThresholdPolicy::call_predicate, method, cur_level);
iveresov@6453 353
iveresov@6453 354 // If OSR method level is greater than the regular method level, the levels should be
iveresov@6453 355 // equalized by raising the regular method level in order to avoid OSRs during each
iveresov@6453 356 // invocation of the method.
iveresov@6453 357 if (osr_level == CompLevel_full_optimization && cur_level == CompLevel_full_profile) {
coleenp@13728 358 MethodData* mdo = method->method_data();
iveresov@6453 359 guarantee(mdo != NULL, "MDO should not be NULL");
iveresov@6453 360 if (mdo->invocation_count() >= 1) {
iveresov@6453 361 next_level = CompLevel_full_optimization;
iveresov@6453 362 }
iveresov@6453 363 } else {
iveresov@6453 364 next_level = MAX2(osr_level, next_level);
iveresov@6453 365 }
iveresov@6453 366
iveresov@6453 367 return next_level;
iveresov@6453 368 }
iveresov@6453 369
iveresov@6453 370 // Determine if we should do an OSR compilation of a given method.
coleenp@13728 371 CompLevel SimpleThresholdPolicy::loop_event(Method* method, CompLevel cur_level) {
iveresov@10013 372 CompLevel next_level = common(&SimpleThresholdPolicy::loop_predicate, method, cur_level);
iveresov@6453 373 if (cur_level == CompLevel_none) {
iveresov@6453 374 // If there is a live OSR method that means that we deopted to the interpreter
iveresov@6453 375 // for the transition.
iveresov@10013 376 CompLevel osr_level = MIN2((CompLevel)method->highest_osr_comp_level(), next_level);
iveresov@6453 377 if (osr_level > CompLevel_none) {
iveresov@6453 378 return osr_level;
iveresov@6453 379 }
iveresov@6453 380 }
iveresov@10013 381 return next_level;
iveresov@6453 382 }
iveresov@6453 383
iveresov@6453 384
iveresov@6453 385 // Handle the invocation event.
coleenp@33593 386 void SimpleThresholdPolicy::method_invocation_event(const methodHandle& mh, const methodHandle& imh,
iveresov@11572 387 CompLevel level, nmethod* nm, JavaThread* thread) {
anoll@24321 388 if (is_compilation_enabled() && !CompileBroker::compilation_is_in_queue(mh)) {
iveresov@6453 389 CompLevel next_level = call_event(mh(), level);
iveresov@6453 390 if (next_level != level) {
iveresov@11572 391 compile(mh, InvocationEntryBci, next_level, thread);
iveresov@6453 392 }
iveresov@6453 393 }
iveresov@6453 394 }
iveresov@6453 395
iveresov@6453 396 // Handle the back branch event. Notice that we can compile the method
iveresov@6453 397 // with a regular entry from here.
coleenp@33593 398 void SimpleThresholdPolicy::method_back_branch_event(const methodHandle& mh, const methodHandle& imh,
iveresov@11572 399 int bci, CompLevel level, nmethod* nm, JavaThread* thread) {
iveresov@6453 400 // If the method is already compiling, quickly bail out.
anoll@24321 401 if (is_compilation_enabled() && !CompileBroker::compilation_is_in_queue(mh)) {
jwilhelm@22551 402 // Use loop event as an opportunity to also check there's been
iveresov@6453 403 // enough calls.
iveresov@6453 404 CompLevel cur_level = comp_level(mh());
iveresov@6453 405 CompLevel next_level = call_event(mh(), cur_level);
iveresov@6453 406 CompLevel next_osr_level = loop_event(mh(), level);
iveresov@6453 407
iveresov@6453 408 next_level = MAX2(next_level,
iveresov@6453 409 next_osr_level < CompLevel_full_optimization ? next_osr_level : cur_level);
iveresov@6453 410 bool is_compiling = false;
iveresov@6453 411 if (next_level != cur_level) {
iveresov@11572 412 compile(mh, InvocationEntryBci, next_level, thread);
iveresov@6453 413 is_compiling = true;
iveresov@6453 414 }
iveresov@6453 415
iveresov@6453 416 // Do the OSR version
iveresov@6453 417 if (!is_compiling && next_osr_level != level) {
iveresov@11572 418 compile(mh, bci, next_osr_level, thread);
iveresov@6453 419 }
iveresov@6453 420 }
iveresov@6453 421 }