src/share/vm/opto/locknode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8031320_8u Cdiff src/share/vm/opto/locknode.cpp

src/share/vm/opto/locknode.cpp

Print this page
rev 5968 : 8031320: Use Intel RTM instructions for locks
Summary: Use RTM for inflated locks and stack locks.
Reviewed-by: iveresov, twisti, roland, dcubed

*** 134,143 **** --- 134,145 ---- //============================================================================= //-----------------------------hash-------------------------------------------- uint FastLockNode::hash() const { return NO_HASH; } + uint FastLockNode::size_of() const { return sizeof(*this); } + //------------------------------cmp-------------------------------------------- uint FastLockNode::cmp( const Node &n ) const { return (&n == this); // Always fail except on self }
*** 157,166 **** --- 159,184 ---- BiasedLockingNamedCounter* blnc = (BiasedLockingNamedCounter*) OptoRuntime::new_named_counter(state, NamedCounter::BiasedLockingCounter); _counters = blnc->counters(); } + void FastLockNode::create_rtm_lock_counter(JVMState* state) { + #if INCLUDE_RTM_OPT + Compile* C = Compile::current(); + if (C->profile_rtm() || (PrintPreciseRTMLockingStatistics && C->use_rtm())) { + RTMLockingNamedCounter* rlnc = (RTMLockingNamedCounter*) + OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter); + _rtm_counters = rlnc->counters(); + if (UseRTMForStackLocks) { + rlnc = (RTMLockingNamedCounter*) + OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter); + _stack_rtm_counters = rlnc->counters(); + } + } + #endif + } + //============================================================================= //------------------------------do_monitor_enter------------------------------- void Parse::do_monitor_enter() { kill_dead_locals();
src/share/vm/opto/locknode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File