comparison src/share/vm/opto/output.cpp @ 4777:e9a5e0a812c8

7125896: Eliminate nested locks Summary: Nested locks elimination done before lock nodes expansion by looking for outer locks of the same object. Reviewed-by: never, twisti
author kvn
date Sat, 07 Jan 2012 13:26:43 -0800
parents 739a9abbbd4b
children fd8114661503
comparison
equal deleted inserted replaced
4776:5da7201222d5 4777:e9a5e0a812c8
922 } else { 922 } else {
923 const TypePtr *tp = obj_node->bottom_type()->make_ptr(); 923 const TypePtr *tp = obj_node->bottom_type()->make_ptr();
924 scval = new ConstantOopWriteValue(tp->is_oopptr()->const_oop()->constant_encoding()); 924 scval = new ConstantOopWriteValue(tp->is_oopptr()->const_oop()->constant_encoding());
925 } 925 }
926 926
927 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); 927 OptoReg::Name box_reg = BoxLockNode::reg(box_node);
928 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); 928 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg));
929 while( !box_node->is_BoxLock() ) box_node = box_node->in(1); 929 bool eliminated = (box_node->is_BoxLock() && box_node->as_BoxLock()->is_eliminated());
930 monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated())); 930 monarray->append(new MonitorValue(scval, basic_lock, eliminated));
931 } 931 }
932 932
933 // We dump the object pool first, since deoptimization reads it in first. 933 // We dump the object pool first, since deoptimization reads it in first.
934 debug_info()->dump_object_pool(objs); 934 debug_info()->dump_object_pool(objs);
935 935