src/share/vm/c1/c1_FrameMap.cpp

changeset 4668
3c9db54c2660
parent 4153
b9a9ed0f8eeb
child 6198
55fb97c4c58d
child 6466
6a936747b569
equal deleted inserted replaced
4645:ec2eddfed950 4668:3c9db54c2660
306 ByteSize FrameMap::sp_offset_for_monitor_object(int index) const { 306 ByteSize FrameMap::sp_offset_for_monitor_object(int index) const {
307 check_monitor_index(index); 307 check_monitor_index(index);
308 return sp_offset_for_monitor_base(index) + in_ByteSize(BasicObjectLock::obj_offset_in_bytes()); 308 return sp_offset_for_monitor_base(index) + in_ByteSize(BasicObjectLock::obj_offset_in_bytes());
309 } 309 }
310 310
311 void FrameMap::print_frame_layout() const {
312 int svar;
313 tty->print_cr("#####################################");
314 tty->print_cr("Frame size in words %d", framesize());
315
316 if( _num_monitors > 0) {
317 tty->print_cr("monitor [0]:%d | [%2d]:%d",
318 in_bytes(sp_offset_for_monitor_base(0)),
319 in_bytes(sp_offset_for_monitor_base(_num_monitors)));
320 }
321 if( _num_spills > 0) {
322 svar = _num_spills - 1;
323 if(svar == 0)
324 tty->print_cr("spill [0]:%d", in_bytes(sp_offset_for_spill(0)));
325 else
326 tty->print_cr("spill [0]:%d | [%2d]:%d", in_bytes(sp_offset_for_spill(0)),
327 svar,
328 in_bytes(sp_offset_for_spill(svar)));
329 }
330 }
331
332 311
333 // For OopMaps, map a local variable or spill index to an VMReg. 312 // For OopMaps, map a local variable or spill index to an VMReg.
334 // This is the offset from sp() in the frame of the slot for the index, 313 // This is the offset from sp() in the frame of the slot for the index,
335 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.) 314 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.)
336 // 315 //

mercurial