< prev index next >

src/hotspot/share/opto/locknode.cpp

Print this page

163   Compile* C = Compile::current();
164   if (C->profile_rtm() || (PrintPreciseRTMLockingStatistics && C->use_rtm())) {
165     RTMLockingNamedCounter* rlnc = (RTMLockingNamedCounter*)
166            OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter);
167     _rtm_counters = rlnc->counters();
168     if (UseRTMForStackLocks) {
169       rlnc = (RTMLockingNamedCounter*)
170            OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter);
171       _stack_rtm_counters = rlnc->counters();
172     }
173   }
174 #endif
175 }
176 
177 //=============================================================================
178 //------------------------------do_monitor_enter-------------------------------
179 void Parse::do_monitor_enter() {
180   kill_dead_locals();
181 
182   C->set_has_monitors(true);

183 
184   // Null check; get casted pointer.
185   Node* obj = null_check(peek());
186   // Check for locking null object
187   if (stopped()) return;
188 
189   // the monitor object is not part of debug info expression stack
190   pop();
191 
192   // Insert a FastLockNode which takes as arguments the current thread pointer,
193   // the obj pointer & the address of the stack slot pair used for the lock.
194   shared_lock(obj);
195 }
196 
197 //------------------------------do_monitor_exit--------------------------------
198 void Parse::do_monitor_exit() {
199   kill_dead_locals();
200 
201   // need to set it for monitor exit as well.
202   // OSR compiled methods can start with lock taken

163   Compile* C = Compile::current();
164   if (C->profile_rtm() || (PrintPreciseRTMLockingStatistics && C->use_rtm())) {
165     RTMLockingNamedCounter* rlnc = (RTMLockingNamedCounter*)
166            OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter);
167     _rtm_counters = rlnc->counters();
168     if (UseRTMForStackLocks) {
169       rlnc = (RTMLockingNamedCounter*)
170            OptoRuntime::new_named_counter(state, NamedCounter::RTMLockingCounter);
171       _stack_rtm_counters = rlnc->counters();
172     }
173   }
174 #endif
175 }
176 
177 //=============================================================================
178 //------------------------------do_monitor_enter-------------------------------
179 void Parse::do_monitor_enter() {
180   kill_dead_locals();
181 
182   C->set_has_monitors(true);
183   C->push_monitor();
184 
185   // Null check; get casted pointer.
186   Node* obj = null_check(peek());
187   // Check for locking null object
188   if (stopped()) return;
189 
190   // the monitor object is not part of debug info expression stack
191   pop();
192 
193   // Insert a FastLockNode which takes as arguments the current thread pointer,
194   // the obj pointer & the address of the stack slot pair used for the lock.
195   shared_lock(obj);
196 }
197 
198 //------------------------------do_monitor_exit--------------------------------
199 void Parse::do_monitor_exit() {
200   kill_dead_locals();
201 
202   // need to set it for monitor exit as well.
203   // OSR compiled methods can start with lock taken
< prev index next >