98 return false; // Merged regions |
98 return false; // Merged regions |
99 if (n->is_AbstractLock()) { |
99 if (n->is_AbstractLock()) { |
100 AbstractLockNode* alock = n->as_AbstractLock(); |
100 AbstractLockNode* alock = n->as_AbstractLock(); |
101 // Check lock's box since box could be referenced by Lock's debug info. |
101 // Check lock's box since box could be referenced by Lock's debug info. |
102 if (alock->box_node() == this) { |
102 if (alock->box_node() == this) { |
103 if (alock->obj_node() == obj) { |
103 if (alock->obj_node()->eqv_uncast(obj)) { |
104 if ((unique_lock != NULL) && alock->is_Lock()) { |
104 if ((unique_lock != NULL) && alock->is_Lock()) { |
105 if (lock == NULL) { |
105 if (lock == NULL) { |
106 lock = alock->as_Lock(); |
106 lock = alock->as_Lock(); |
107 has_one_lock = true; |
107 has_one_lock = true; |
108 } else if (lock != alock->as_Lock()) { |
108 } else if (lock != alock->as_Lock()) { |
119 // Verify that FastLock and Safepoint reference only this lock region. |
119 // Verify that FastLock and Safepoint reference only this lock region. |
120 for (uint i = 0; i < this->outcnt(); i++) { |
120 for (uint i = 0; i < this->outcnt(); i++) { |
121 Node* n = this->raw_out(i); |
121 Node* n = this->raw_out(i); |
122 if (n->is_FastLock()) { |
122 if (n->is_FastLock()) { |
123 FastLockNode* flock = n->as_FastLock(); |
123 FastLockNode* flock = n->as_FastLock(); |
124 assert((flock->box_node() == this) && (flock->obj_node() == obj),""); |
124 assert((flock->box_node() == this) && flock->obj_node()->eqv_uncast(obj),""); |
125 } |
125 } |
126 if (n->is_SafePoint() && n->as_SafePoint()->jvms()) { |
126 if (n->is_SafePoint() && n->as_SafePoint()->jvms()) { |
127 SafePointNode* sfn = n->as_SafePoint(); |
127 SafePointNode* sfn = n->as_SafePoint(); |
128 JVMState* youngest_jvms = sfn->jvms(); |
128 JVMState* youngest_jvms = sfn->jvms(); |
129 int max_depth = youngest_jvms->depth(); |
129 int max_depth = youngest_jvms->depth(); |
133 // Loop over monitors |
133 // Loop over monitors |
134 for (int idx = 0; idx < num_mon; idx++) { |
134 for (int idx = 0; idx < num_mon; idx++) { |
135 Node* obj_node = sfn->monitor_obj(jvms, idx); |
135 Node* obj_node = sfn->monitor_obj(jvms, idx); |
136 Node* box_node = sfn->monitor_box(jvms, idx); |
136 Node* box_node = sfn->monitor_box(jvms, idx); |
137 if (box_node == this) { |
137 if (box_node == this) { |
138 assert(obj_node == obj,""); |
138 assert(obj_node->eqv_uncast(obj),""); |
139 } |
139 } |
140 } |
140 } |
141 } |
141 } |
142 } |
142 } |
143 } |
143 } |