< prev index next >

src/hotspot/share/runtime/vframe.cpp

Print this page

259 
260         found_first_monitor = true;
261       }
262     }
263   }
264 }
265 
266 // ------------- interpretedVFrame --------------
267 
268 u_char* interpretedVFrame::bcp() const {
269   return stack_chunk() == nullptr ? fr().interpreter_frame_bcp() : stack_chunk()->interpreter_frame_bcp(fr());
270 }
271 
272 intptr_t* interpretedVFrame::locals_addr_at(int offset) const {
273   assert(stack_chunk() == nullptr, "Not supported for heap frames"); // unsupported for now because seems to be unused
274   assert(fr().is_interpreted_frame(), "frame should be an interpreted frame");
275   return fr().interpreter_frame_local_at(offset);
276 }
277 
278 GrowableArray<MonitorInfo*>* interpretedVFrame::monitors() const {


279   GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(5);
280   if (stack_chunk() == nullptr) { // no monitors in continuations
281     for (BasicObjectLock* current = (fr().previous_monitor_in_interpreter_frame(fr().interpreter_frame_monitor_begin()));
282         current >= fr().interpreter_frame_monitor_end();
283         current = fr().previous_monitor_in_interpreter_frame(current)) {
284       result->push(new MonitorInfo(current->obj(), current->lock(), false, false));
285     }
286   }
287   return result;
288 }
289 
290 int interpretedVFrame::bci() const {
291   return method()->bci_from(bcp());
292 }
293 
294 Method* interpretedVFrame::method() const {
295   return stack_chunk() == nullptr ? fr().interpreter_frame_method() : stack_chunk()->interpreter_frame_method(fr());
296 }
297 
298 static StackValue* create_stack_value_from_oop_map(const InterpreterOopMap& oop_mask,
299                                                    int index,
300                                                    const intptr_t* const addr,
301                                                    stackChunkOop chunk) {
302 
303   assert(index >= 0 && index < oop_mask.number_of_entries(), "invariant");
304 
305   // categorize using oop_mask

259 
260         found_first_monitor = true;
261       }
262     }
263   }
264 }
265 
266 // ------------- interpretedVFrame --------------
267 
268 u_char* interpretedVFrame::bcp() const {
269   return stack_chunk() == nullptr ? fr().interpreter_frame_bcp() : stack_chunk()->interpreter_frame_bcp(fr());
270 }
271 
272 intptr_t* interpretedVFrame::locals_addr_at(int offset) const {
273   assert(stack_chunk() == nullptr, "Not supported for heap frames"); // unsupported for now because seems to be unused
274   assert(fr().is_interpreted_frame(), "frame should be an interpreted frame");
275   return fr().interpreter_frame_local_at(offset);
276 }
277 
278 GrowableArray<MonitorInfo*>* interpretedVFrame::monitors() const {
279   bool heap_frame = stack_chunk() != nullptr;
280   frame f = !heap_frame ? _fr : stack_chunk()->derelativize(_fr);
281   GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(5);
282   for (BasicObjectLock* current = (f.previous_monitor_in_interpreter_frame(f.interpreter_frame_monitor_begin()));
283       current >= f.interpreter_frame_monitor_end();
284       current = f.previous_monitor_in_interpreter_frame(current)) {
285       oop owner = !heap_frame ? current->obj() : StackValue::create_stack_value_from_oop_location(stack_chunk(), (void*)current->obj_adr())->get_obj()();
286     result->push(new MonitorInfo(owner, current->lock(), false, false));

287   }
288   return result;
289 }
290 
291 int interpretedVFrame::bci() const {
292   return method()->bci_from(bcp());
293 }
294 
295 Method* interpretedVFrame::method() const {
296   return stack_chunk() == nullptr ? fr().interpreter_frame_method() : stack_chunk()->interpreter_frame_method(fr());
297 }
298 
299 static StackValue* create_stack_value_from_oop_map(const InterpreterOopMap& oop_mask,
300                                                    int index,
301                                                    const intptr_t* const addr,
302                                                    stackChunkOop chunk) {
303 
304   assert(index >= 0 && index < oop_mask.number_of_entries(), "invariant");
305 
306   // categorize using oop_mask
< prev index next >