Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/runtime/deoptimization.cpp
          +++ new/src/share/vm/runtime/deoptimization.cpp
↓ open down ↓ 1480 lines elided ↑ open up ↑
1481 1481            // several times.
1482 1482            //
1483 1483            // Actually, since there is only one bit of counter per BCI,
1484 1484            // the possible per-BCI counts are {0,1,(per-method count)}.
1485 1485            // This produces accurate results if in fact there is only
1486 1486            // one hot trap site, but begins to get fuzzy if there are
1487 1487            // many sites.  For example, if there are ten sites each
1488 1488            // trapping two or more times, they each get the blame for
1489 1489            // all of their traps.
1490 1490            make_not_entrant = true;
     1491 +          if (per_bc_reason == Reason_unhandled) {
     1492 +            make_not_compilable = true;
     1493 +          }
1491 1494          }
1492 1495  
1493 1496          // Detect repeated recompilation at the same BCI, and enforce a limit.
1494 1497          if (make_not_entrant && maybe_prior_recompile) {
1495 1498            // More than one recompile at this point.
1496 1499            inc_recompile_count = maybe_prior_trap;
1497 1500          }
1498 1501        } else {
1499 1502          // For reasons which are not recorded per-bytecode, we simply
1500 1503          // force recompiles unconditionally.
↓ open down ↓ 99 lines elided ↑ open up ↑
1600 1603  
1601 1604    // If the runtime cannot find a place to store trap history,
1602 1605    // it is estimated based on the general condition of the method.
1603 1606    // If the method has ever been recompiled, or has ever incurred
1604 1607    // a trap with the present reason , then this BCI is assumed
1605 1608    // (pessimistically) to be the culprit.
1606 1609    bool maybe_prior_trap      = (prior_trap_count != 0);
1607 1610    bool maybe_prior_recompile = (trap_mdo->decompile_count() != 0);
1608 1611    ProfileData* pdata = NULL;
1609 1612  
1610      -
1611 1613    // For reasons which are recorded per bytecode, we check per-BCI data.
1612 1614    DeoptReason per_bc_reason = reason_recorded_per_bytecode_if_any(reason);
1613 1615    if (per_bc_reason != Reason_none) {
1614 1616      // Find the profile data for this BCI.  If there isn't one,
1615 1617      // try to allocate one from the MDO's set of spares.
1616 1618      // This will let us detect a repeated trap at this point.
1617 1619      pdata = trap_mdo->allocate_bci_to_data(trap_bci);
1618 1620  
1619 1621      if (pdata != NULL) {
1620 1622        // Query the trap state of this profile datum.
↓ open down ↓ 338 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX