equal
deleted
inserted
replaced
187 int tally = 0; |
187 int tally = 0; |
188 do { |
188 do { |
189 mon->INotify(self); |
189 mon->INotify(self); |
190 ++tally; |
190 ++tally; |
191 } while (mon->first_waiter() != NULL && all); |
191 } while (mon->first_waiter() != NULL && all); |
192 if (ObjectMonitor::_sync_Notifications != NULL) { |
192 OM_PERFDATA_OP(Notifications, inc(tally)); |
193 ObjectMonitor::_sync_Notifications->inc(tally); |
|
194 } |
|
195 } |
193 } |
196 return true; |
194 return true; |
197 } |
195 } |
198 |
196 |
199 // biased locking and any other IMS exception states take the slow-path |
197 // biased locking and any other IMS exception states take the slow-path |
1411 guarantee(object->mark() == markOopDesc::INFLATING(), "invariant"); |
1409 guarantee(object->mark() == markOopDesc::INFLATING(), "invariant"); |
1412 object->release_set_mark(markOopDesc::encode(m)); |
1410 object->release_set_mark(markOopDesc::encode(m)); |
1413 |
1411 |
1414 // Hopefully the performance counters are allocated on distinct cache lines |
1412 // Hopefully the performance counters are allocated on distinct cache lines |
1415 // to avoid false sharing on MP systems ... |
1413 // to avoid false sharing on MP systems ... |
1416 if (ObjectMonitor::_sync_Inflations != NULL) ObjectMonitor::_sync_Inflations->inc(); |
1414 OM_PERFDATA_OP(Inflations, inc()); |
1417 TEVENT(Inflate: overwrite stacklock); |
1415 TEVENT(Inflate: overwrite stacklock); |
1418 if (TraceMonitorInflation) { |
1416 if (TraceMonitorInflation) { |
1419 if (object->is_instance()) { |
1417 if (object->is_instance()) { |
1420 ResourceMark rm; |
1418 ResourceMark rm; |
1421 tty->print_cr("Inflating object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s", |
1419 tty->print_cr("Inflating object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s", |
1459 // live-lock -- "Inflated" is an absorbing state. |
1457 // live-lock -- "Inflated" is an absorbing state. |
1460 } |
1458 } |
1461 |
1459 |
1462 // Hopefully the performance counters are allocated on distinct |
1460 // Hopefully the performance counters are allocated on distinct |
1463 // cache lines to avoid false sharing on MP systems ... |
1461 // cache lines to avoid false sharing on MP systems ... |
1464 if (ObjectMonitor::_sync_Inflations != NULL) ObjectMonitor::_sync_Inflations->inc(); |
1462 OM_PERFDATA_OP(Inflations, inc()); |
1465 TEVENT(Inflate: overwrite neutral); |
1463 TEVENT(Inflate: overwrite neutral); |
1466 if (TraceMonitorInflation) { |
1464 if (TraceMonitorInflation) { |
1467 if (object->is_instance()) { |
1465 if (object->is_instance()) { |
1468 ResourceMark rm; |
1466 ResourceMark rm; |
1469 tty->print_cr("Inflating object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s", |
1467 tty->print_cr("Inflating object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s", |
1676 freeTailp->FreeNext = gFreeList; |
1674 freeTailp->FreeNext = gFreeList; |
1677 gFreeList = freeHeadp; |
1675 gFreeList = freeHeadp; |
1678 } |
1676 } |
1679 Thread::muxRelease(&gListLock); |
1677 Thread::muxRelease(&gListLock); |
1680 |
1678 |
1681 if (ObjectMonitor::_sync_Deflations != NULL) ObjectMonitor::_sync_Deflations->inc(nScavenged); |
1679 OM_PERFDATA_OP(Deflations, inc(nScavenged)); |
1682 if (ObjectMonitor::_sync_MonExtant != NULL) ObjectMonitor::_sync_MonExtant ->set_value(nInCirculation); |
1680 OM_PERFDATA_OP(MonExtant, set_value(nInCirculation)); |
1683 |
1681 |
1684 // TODO: Add objectMonitor leak detection. |
1682 // TODO: Add objectMonitor leak detection. |
1685 // Audit/inventory the objectMonitors -- make sure they're all accounted for. |
1683 // Audit/inventory the objectMonitors -- make sure they're all accounted for. |
1686 GVars.stwRandom = os::random(); |
1684 GVars.stwRandom = os::random(); |
1687 GVars.stwCycle++; |
1685 GVars.stwCycle++; |