134 |
134 |
135 //============================================================================= |
135 //============================================================================= |
136 //-----------------------------hash-------------------------------------------- |
136 //-----------------------------hash-------------------------------------------- |
137 uint FastLockNode::hash() const { return NO_HASH; } |
137 uint FastLockNode::hash() const { return NO_HASH; } |
138 |
138 |
|
139 uint FastLockNode::size_of() const { return sizeof(*this); } |
|
140 |
139 //------------------------------cmp-------------------------------------------- |
141 //------------------------------cmp-------------------------------------------- |
140 uint FastLockNode::cmp( const Node &n ) const { |
142 uint FastLockNode::cmp( const Node &n ) const { |
141 return (&n == this); // Always fail except on self |
143 return (&n == this); // Always fail except on self |
142 } |
144 } |
143 |
145 |
157 BiasedLockingNamedCounter* blnc = (BiasedLockingNamedCounter*) |
159 BiasedLockingNamedCounter* blnc = (BiasedLockingNamedCounter*) |
158 OptoRuntime::new_named_counter(state, NamedCounter::BiasedLockingCounter); |
160 OptoRuntime::new_named_counter(state, NamedCounter::BiasedLockingCounter); |
159 _counters = blnc->counters(); |
161 _counters = blnc->counters(); |
160 } |
162 } |
161 |
163 |
|
164 void FastLockNode::create_rtm_lock_counter(JVMState* state) { |
|
165 #if INCLUDE_RTM_OPT |
|
166 Compile* C = Compile::current(); |
|
167 if (C->profile_rtm() || (PrintPreciseRTMLockingStatistics && C->use_rtm())) { |
|
168 RTMLockingNamedCounter* rlnc = (RTMLockingNamedCounter*) |
|
169 OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter); |
|
170 _rtm_counters = rlnc->counters(); |
|
171 if (UseRTMForStackLocks) { |
|
172 rlnc = (RTMLockingNamedCounter*) |
|
173 OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter); |
|
174 _stack_rtm_counters = rlnc->counters(); |
|
175 } |
|
176 } |
|
177 #endif |
|
178 } |
|
179 |
162 //============================================================================= |
180 //============================================================================= |
163 //------------------------------do_monitor_enter------------------------------- |
181 //------------------------------do_monitor_enter------------------------------- |
164 void Parse::do_monitor_enter() { |
182 void Parse::do_monitor_enter() { |
165 kill_dead_locals(); |
183 kill_dead_locals(); |
166 |
184 |