1443 // PerMethodRecompilationCutoff, the method is abandoned.
1444 // This should only happen if the method is very large and has
1445 // many "lukewarm" deoptimizations. The code which enforces this
1446 // limit is elsewhere (class nmethod, class Method).
1447 //
1448 // Note that the per-BCI 'is_recompiled' bit gives the compiler one chance
1449 // to recompile at each bytecode independently of the per-BCI cutoff.
1450 //
1451 // The decision to update code is up to the compiler, and is encoded
1452 // in the Action_xxx code. If the compiler requests Action_none
1453 // no trap state is changed, no compiled code is changed, and the
1454 // computation suffers along in the interpreter.
1455 //
1456 // The other action codes specify various tactics for decompilation
1457 // and recompilation. Action_maybe_recompile is the loosest, and
1458 // allows the compiled code to stay around until enough traps are seen,
1459 // and until the compiler gets around to recompiling the trapping method.
1460 //
1461 // The other actions cause immediate removal of the present code.
1462
1463 bool update_trap_state = (reason != Reason_tenured);
1464 bool make_not_entrant = false;
1465 bool make_not_compilable = false;
1466 bool reprofile = false;
1467 switch (action) {
1468 case Action_none:
1469 // Keep the old code.
1470 update_trap_state = false;
1471 break;
1472 case Action_maybe_recompile:
1473 // Do not need to invalidate the present code, but we can
1474 // initiate another
1475 // Start compiler without (necessarily) invalidating the nmethod.
1476 // The system will tolerate the old code, but new code should be
1477 // generated when possible.
1478 break;
1479 case Action_reinterpret:
1480 // Go back into the interpreter for a while, and then consider
1481 // recompiling form scratch.
1482 make_not_entrant = true;
1483 // Reset invocation counter for outer most method.
|
1443 // PerMethodRecompilationCutoff, the method is abandoned.
1444 // This should only happen if the method is very large and has
1445 // many "lukewarm" deoptimizations. The code which enforces this
1446 // limit is elsewhere (class nmethod, class Method).
1447 //
1448 // Note that the per-BCI 'is_recompiled' bit gives the compiler one chance
1449 // to recompile at each bytecode independently of the per-BCI cutoff.
1450 //
1451 // The decision to update code is up to the compiler, and is encoded
1452 // in the Action_xxx code. If the compiler requests Action_none
1453 // no trap state is changed, no compiled code is changed, and the
1454 // computation suffers along in the interpreter.
1455 //
1456 // The other action codes specify various tactics for decompilation
1457 // and recompilation. Action_maybe_recompile is the loosest, and
1458 // allows the compiled code to stay around until enough traps are seen,
1459 // and until the compiler gets around to recompiling the trapping method.
1460 //
1461 // The other actions cause immediate removal of the present code.
1462
1463 // Traps caused by injected profile shouldn't pollute trap counts.
1464 bool injected_profile_trap = trap_method->has_injected_profile() &&
1465 (reason == Reason_intrinsic || reason == Reason_unreached);
1466
1467 bool update_trap_state = (reason != Reason_tenured) && !injected_profile_trap;
1468 bool make_not_entrant = false;
1469 bool make_not_compilable = false;
1470 bool reprofile = false;
1471 switch (action) {
1472 case Action_none:
1473 // Keep the old code.
1474 update_trap_state = false;
1475 break;
1476 case Action_maybe_recompile:
1477 // Do not need to invalidate the present code, but we can
1478 // initiate another
1479 // Start compiler without (necessarily) invalidating the nmethod.
1480 // The system will tolerate the old code, but new code should be
1481 // generated when possible.
1482 break;
1483 case Action_reinterpret:
1484 // Go back into the interpreter for a while, and then consider
1485 // recompiling form scratch.
1486 make_not_entrant = true;
1487 // Reset invocation counter for outer most method.
|