comparison src/share/vm/opto/output.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 72c5366e5d86
children 98cb887364d3
comparison
equal deleted inserted replaced
459:3a86a8dcf27c 460:424f9bfe6b96
847 GrowableArray<MonitorValue*> *monarray = new GrowableArray<MonitorValue*>(num_mon); 847 GrowableArray<MonitorValue*> *monarray = new GrowableArray<MonitorValue*>(num_mon);
848 848
849 // Loop over monitors and insert into array 849 // Loop over monitors and insert into array
850 for(idx = 0; idx < num_mon; idx++) { 850 for(idx = 0; idx < num_mon; idx++) {
851 // Grab the node that defines this monitor 851 // Grab the node that defines this monitor
852 Node* box_node; 852 Node* box_node = sfn->monitor_box(jvms, idx);
853 Node* obj_node; 853 Node* obj_node = sfn->monitor_obj(jvms, idx);
854 box_node = sfn->monitor_box(jvms, idx);
855 obj_node = sfn->monitor_obj(jvms, idx);
856 854
857 // Create ScopeValue for object 855 // Create ScopeValue for object
858 ScopeValue *scval = NULL; 856 ScopeValue *scval = NULL;
859 857
860 if( obj_node->is_SafePointScalarObject() ) { 858 if( obj_node->is_SafePointScalarObject() ) {
888 scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->encoding()); 886 scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->encoding());
889 } 887 }
890 888
891 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); 889 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node);
892 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); 890 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg));
891 while( !box_node->is_BoxLock() ) box_node = box_node->in(1);
893 monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated())); 892 monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated()));
894 } 893 }
895 894
896 // We dump the object pool first, since deoptimization reads it in first. 895 // We dump the object pool first, since deoptimization reads it in first.
897 debug_info()->dump_object_pool(objs); 896 debug_info()->dump_object_pool(objs);