< prev index next >

src/hotspot/share/runtime/vframe.cpp

Print this page

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


280   GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(5);
281   if (stack_chunk() == nullptr) { // no monitors in continuations
282     for (BasicObjectLock* current = (fr().previous_monitor_in_interpreter_frame(fr().interpreter_frame_monitor_begin()));
283         current >= fr().interpreter_frame_monitor_end();
284         current = fr().previous_monitor_in_interpreter_frame(current)) {
285       result->push(new MonitorInfo(current->obj(), current->lock(), false, false));
286     }
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

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

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