Mercurial > hg > truffle
diff src/share/vm/opto/callnode.cpp @ 460:424f9bfe6b96
6775880: EA +DeoptimizeALot: assert(mon_info->owner()->is_locked(),"object must be locked now")
Summary: Create new "eliminated" BoxLock node for monitor debug info when corresponding locks are eliminated.
Reviewed-by: never
author | kvn |
---|---|
date | Wed, 03 Dec 2008 13:41:37 -0800 |
parents | a1980da045cc |
children | 523ded093c31 |
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.cpp Tue Nov 25 13:14:07 2008 -0800 +++ b/src/share/vm/opto/callnode.cpp Wed Dec 03 13:41:37 2008 -0800 @@ -395,7 +395,13 @@ OptoReg::regname(OptoReg::c_frame_pointer), regalloc->reg2offset(box_reg)); } - format_helper( regalloc, st, obj, "MON-OBJ[", i, &scobjs ); + const char* obj_msg = "MON-OBJ["; + if (EliminateLocks) { + while( !box->is_BoxLock() ) box = box->in(1); + if (box->as_BoxLock()->is_eliminated()) + obj_msg = "MON-OBJ(LOCK ELIMINATED)["; + } + format_helper( regalloc, st, obj, obj_msg, i, &scobjs ); } for (i = 0; i < (uint)scobjs.length(); i++) { @@ -908,8 +914,9 @@ add_req(lock->box_node()); add_req(lock->obj_node()); } else { - add_req(NULL); - add_req(NULL); + Node* top = Compile::current()->top(); + add_req(top); + add_req(top); } jvms()->set_scloff(nextmon+MonitorEdges); jvms()->set_endoff(req()); @@ -1382,7 +1389,7 @@ // // If we are locking an unescaped object, the lock/unlock is unnecessary // - ConnectionGraph *cgr = Compile::current()->congraph(); + ConnectionGraph *cgr = phase->C->congraph(); PointsToNode::EscapeState es = PointsToNode::GlobalEscape; if (cgr != NULL) es = cgr->escape_state(obj_node(), phase); @@ -1450,6 +1457,7 @@ // Mark it eliminated to update any counters lock->set_eliminated(); + lock->set_coarsened(); } } else if (result != NULL && ctrl->is_Region() && iter->_worklist.member(ctrl)) { @@ -1484,7 +1492,7 @@ // // If we are unlocking an unescaped object, the lock/unlock is unnecessary. // - ConnectionGraph *cgr = Compile::current()->congraph(); + ConnectionGraph *cgr = phase->C->congraph(); PointsToNode::EscapeState es = PointsToNode::GlobalEscape; if (cgr != NULL) es = cgr->escape_state(obj_node(), phase);