void JVMState::format(PhaseRegAlloc *regalloc, const Node *n) const { tty->print(" #"); if( _method ) { _method->print_short_name(); tty->print(" @ bci:%d ",_bci); } else { tty->print_cr(" runtime stub "); return; } MachNode *mach = ((Node *)n)->is_Mach(); MachSafePointNode *mcall = mach->is_MachSafePoint(); if (mcall) { uint i; // Print locals for( i = 0; i < (uint)loc_size(); i++ ) format_helper( regalloc, mcall->local(this, i), "L", i ); // Print stack for (i = 0; i < (uint)stk_size(); i++) { if ((uint)(_stkoff + i) >= mcall->len()) tty->print(" oob "); else format_helper( regalloc, mcall->stack(this, i), "STK", i ); } for (i = 0; (int)i < nof_monitors(); i++) { Node *box = mcall->monitor_box(this, i); Node *obj = mcall->monitor_obj(this, i); if ( regalloc->get_reg_lo(box) != OptoReg::Bad ) { while( !box->is_BoxLock() ) box = box->in(1); format_helper( regalloc, box, "MON-BOX", i ); } else { OptoReg::Name box_reg = BoxLockNode::stack_slot(box); tty->print(" MON-BOX%d=%s+%d",i,SharedInfo::regName[SharedInfo::c_frame_pointer],regalloc->reg2offset(box_reg)); } format_helper( regalloc, obj, "MON-OBJ", i ); } } tty->print_cr(""); if (caller() != NULL) caller()->format(regalloc, n); }
int monitor_depth() const { return nof_monitors() + (caller() ? caller()->monitor_depth() : 0); }