Print this page
rev 6890 : 8062950: Bug in locking code when UseOptoBiasInlining is disabled: assert(dmw->is_neutral()) failed: invariant
Reviewed-by: dholmes, kvn

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
          +++ new/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
↓ open down ↓ 1761 lines elided ↑ open up ↑
1762 1762  
1763 1763      Label IsInflated, DONE_LABEL;
1764 1764  
1765 1765      // it's stack-locked, biased or neutral
1766 1766      // TODO: optimize away redundant LDs of obj->mark and improve the markword triage
1767 1767      // order to reduce the number of conditional branches in the most common cases.
1768 1768      // Beware -- there's a subtle invariant that fetch of the markword
1769 1769      // at [FETCH], below, will never observe a biased encoding (*101b).
1770 1770      // If this invariant is not held we risk exclusion (safety) failure.
1771 1771      if (UseBiasedLocking && !UseOptoBiasInlining) {
1772      -      biased_locking_enter(boxReg, objReg, tmpReg, scrReg, true, DONE_LABEL, NULL, counters);
     1772 +      biased_locking_enter(boxReg, objReg, tmpReg, scrReg, false, DONE_LABEL, NULL, counters);
1773 1773      }
1774 1774  
1775 1775  #if INCLUDE_RTM_OPT
1776 1776      if (UseRTMForStackLocks && use_rtm) {
1777 1777        rtm_stack_locking(objReg, tmpReg, scrReg, cx2Reg,
1778 1778                          stack_rtm_counters, method_data, profile_rtm,
1779 1779                          DONE_LABEL, IsInflated);
1780 1780      }
1781 1781  #endif // INCLUDE_RTM_OPT
1782 1782  
↓ open down ↓ 6223 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX