equal
deleted
inserted
replaced
1526 // Perversely, the heap size -- and thus the STW safepoint rate -- |
1526 // Perversely, the heap size -- and thus the STW safepoint rate -- |
1527 // typically drives the scavenge rate. Large heaps can mean infrequent GC, |
1527 // typically drives the scavenge rate. Large heaps can mean infrequent GC, |
1528 // which in turn can mean large(r) numbers of objectmonitors in circulation. |
1528 // which in turn can mean large(r) numbers of objectmonitors in circulation. |
1529 // This is an unfortunate aspect of this design. |
1529 // This is an unfortunate aspect of this design. |
1530 |
1530 |
1531 enum ManifestConstants { |
|
1532 ClearResponsibleAtSTW = 0 |
|
1533 }; |
|
1534 |
|
1535 // Deflate a single monitor if not in-use |
1531 // Deflate a single monitor if not in-use |
1536 // Return true if deflated, false if in-use |
1532 // Return true if deflated, false if in-use |
1537 bool ObjectSynchronizer::deflate_monitor(ObjectMonitor* mid, oop obj, |
1533 bool ObjectSynchronizer::deflate_monitor(ObjectMonitor* mid, oop obj, |
1538 ObjectMonitor** freeHeadp, |
1534 ObjectMonitor** freeHeadp, |
1539 ObjectMonitor** freeTailp) { |
1535 ObjectMonitor** freeTailp) { |
1542 guarantee(obj->mark() == markOopDesc::encode(mid), "invariant"); |
1538 guarantee(obj->mark() == markOopDesc::encode(mid), "invariant"); |
1543 guarantee(mid == obj->mark()->monitor(), "invariant"); |
1539 guarantee(mid == obj->mark()->monitor(), "invariant"); |
1544 guarantee(mid->header()->is_neutral(), "invariant"); |
1540 guarantee(mid->header()->is_neutral(), "invariant"); |
1545 |
1541 |
1546 if (mid->is_busy()) { |
1542 if (mid->is_busy()) { |
1547 if (ClearResponsibleAtSTW) mid->_Responsible = NULL; |
|
1548 deflated = false; |
1543 deflated = false; |
1549 } else { |
1544 } else { |
1550 // Deflate the monitor if it is no longer being used |
1545 // Deflate the monitor if it is no longer being used |
1551 // It's idle - scavenge and return to the global free list |
1546 // It's idle - scavenge and return to the global free list |
1552 // plain old deflation ... |
1547 // plain old deflation ... |