equal
deleted
inserted
replaced
171 return true; |
171 return true; |
172 } |
172 } |
173 |
173 |
174 if (mark->has_monitor()) { |
174 if (mark->has_monitor()) { |
175 ObjectMonitor * const mon = mark->monitor(); |
175 ObjectMonitor * const mon = mark->monitor(); |
176 assert(mon->object() == obj, "invariant"); |
176 assert(oopDesc::equals((oop) mon->object(), obj), "invariant"); |
177 if (mon->owner() != self) return false; // slow-path for IMS exception |
177 if (mon->owner() != self) return false; // slow-path for IMS exception |
178 |
178 |
179 if (mon->first_waiter() != NULL) { |
179 if (mon->first_waiter() != NULL) { |
180 // We have one or more waiters. Since this is an inflated monitor |
180 // We have one or more waiters. Since this is an inflated monitor |
181 // that we own, we can transfer one or more threads from the waitset |
181 // that we own, we can transfer one or more threads from the waitset |
215 if (obj == NULL) return false; // Need to throw NPE |
215 if (obj == NULL) return false; // Need to throw NPE |
216 const markOop mark = obj->mark(); |
216 const markOop mark = obj->mark(); |
217 |
217 |
218 if (mark->has_monitor()) { |
218 if (mark->has_monitor()) { |
219 ObjectMonitor * const m = mark->monitor(); |
219 ObjectMonitor * const m = mark->monitor(); |
220 assert(m->object() == obj, "invariant"); |
220 assert(oopDesc::equals((oop) m->object(), obj), "invariant"); |
221 Thread * const owner = (Thread *) m->_owner; |
221 Thread * const owner = (Thread *) m->_owner; |
222 |
222 |
223 // Lock contention and Transactional Lock Elision (TLE) diagnostics |
223 // Lock contention and Transactional Lock Elision (TLE) diagnostics |
224 // and observability |
224 // and observability |
225 // Case: light contention possibly amenable to TLE |
225 // Case: light contention possibly amenable to TLE |
1402 |
1402 |
1403 // CASE: inflated |
1403 // CASE: inflated |
1404 if (mark->has_monitor()) { |
1404 if (mark->has_monitor()) { |
1405 ObjectMonitor * inf = mark->monitor(); |
1405 ObjectMonitor * inf = mark->monitor(); |
1406 assert(inf->header()->is_neutral(), "invariant"); |
1406 assert(inf->header()->is_neutral(), "invariant"); |
1407 assert(inf->object() == object, "invariant"); |
1407 assert(oopDesc::equals((oop) inf->object(), object), "invariant"); |
1408 assert(ObjectSynchronizer::verify_objmon_isinpool(inf), "monitor is invalid"); |
1408 assert(ObjectSynchronizer::verify_objmon_isinpool(inf), "monitor is invalid"); |
1409 return inf; |
1409 return inf; |
1410 } |
1410 } |
1411 |
1411 |
1412 // CASE: inflation in progress - inflating over a stack-lock. |
1412 // CASE: inflation in progress - inflating over a stack-lock. |