Mercurial > hg > truffle
comparison src/share/vm/opto/locknode.cpp @ 4792:89d0a5d40008
7129618: assert(obj_node->eqv_uncast(obj),"");
Summary: Relax verification and locks elimination checks for new implementation (EliminateNestedLocks).
Reviewed-by: iveresov
author | kvn |
---|---|
date | Fri, 13 Jan 2012 12:58:26 -0800 |
parents | b0ff910edfc9 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
4791:f4d8930a45b9 | 4792:89d0a5d40008 |
---|---|
116 Node* n = this->raw_out(i); | 116 Node* n = this->raw_out(i); |
117 if (n->is_FastLock()) { | 117 if (n->is_FastLock()) { |
118 FastLockNode* flock = n->as_FastLock(); | 118 FastLockNode* flock = n->as_FastLock(); |
119 assert((flock->box_node() == this) && flock->obj_node()->eqv_uncast(obj),""); | 119 assert((flock->box_node() == this) && flock->obj_node()->eqv_uncast(obj),""); |
120 } | 120 } |
121 if (n->is_SafePoint() && n->as_SafePoint()->jvms()) { | 121 // Don't check monitor info in safepoints since the referenced object could |
122 SafePointNode* sfn = n->as_SafePoint(); | 122 // be different from the locked object. It could be Phi node of different |
123 JVMState* youngest_jvms = sfn->jvms(); | 123 // cast nodes which point to this locked object. |
124 int max_depth = youngest_jvms->depth(); | 124 // We assume that no other objects could be referenced in monitor info |
125 for (int depth = 1; depth <= max_depth; depth++) { | 125 // associated with this BoxLock node because all associated locks and |
126 JVMState* jvms = youngest_jvms->of_depth(depth); | 126 // unlocks are reference only this one object. |
127 int num_mon = jvms->nof_monitors(); | |
128 // Loop over monitors | |
129 for (int idx = 0; idx < num_mon; idx++) { | |
130 Node* obj_node = sfn->monitor_obj(jvms, idx); | |
131 Node* box_node = sfn->monitor_box(jvms, idx); | |
132 if (box_node == this) { | |
133 if (!obj_node->eqv_uncast(obj)) { | |
134 tty->cr(); | |
135 tty->print_cr("=====monitor info has different obj====="); | |
136 tty->print_cr("obj:"); | |
137 obj->dump(1); tty->cr(); | |
138 tty->print_cr("obj uncast:"); | |
139 obj->uncast()->dump(); tty->cr(); | |
140 tty->print_cr("obj_node:"); | |
141 obj_node->dump(1); tty->cr(); | |
142 tty->print_cr("obj_node uncast:"); | |
143 obj_node->uncast()->dump(); | |
144 } | |
145 assert(obj_node->eqv_uncast(obj),"monitor info has different obj"); | |
146 } | |
147 } | |
148 } | |
149 } | |
150 } | 127 } |
151 #endif | 128 #endif |
152 if (unique_lock != NULL && has_one_lock) { | 129 if (unique_lock != NULL && has_one_lock) { |
153 *unique_lock = lock; | 130 *unique_lock = lock; |
154 } | 131 } |