1720 } |
1720 } |
1721 return false; |
1721 return false; |
1722 } |
1722 } |
1723 }; |
1723 }; |
1724 |
1724 |
1725 void G1CollectedHeap::oop_iterate(OopClosure* cl) { |
1725 void G1CollectedHeap::oop_iterate(OopClosure* cl, bool do_perm) { |
1726 IterateOopClosureRegionClosure blk(_g1_committed, cl); |
1726 IterateOopClosureRegionClosure blk(_g1_committed, cl); |
1727 _hrs->iterate(&blk); |
1727 _hrs->iterate(&blk); |
1728 } |
1728 if (do_perm) { |
1729 |
1729 perm_gen()->oop_iterate(cl); |
1730 void G1CollectedHeap::oop_iterate(MemRegion mr, OopClosure* cl) { |
1730 } |
|
1731 } |
|
1732 |
|
1733 void G1CollectedHeap::oop_iterate(MemRegion mr, OopClosure* cl, bool do_perm) { |
1731 IterateOopClosureRegionClosure blk(mr, cl); |
1734 IterateOopClosureRegionClosure blk(mr, cl); |
1732 _hrs->iterate(&blk); |
1735 _hrs->iterate(&blk); |
|
1736 if (do_perm) { |
|
1737 perm_gen()->oop_iterate(cl); |
|
1738 } |
1733 } |
1739 } |
1734 |
1740 |
1735 // Iterates an ObjectClosure over all objects within a HeapRegion. |
1741 // Iterates an ObjectClosure over all objects within a HeapRegion. |
1736 |
1742 |
1737 class IterateObjectClosureRegionClosure: public HeapRegionClosure { |
1743 class IterateObjectClosureRegionClosure: public HeapRegionClosure { |
1744 } |
1750 } |
1745 return false; |
1751 return false; |
1746 } |
1752 } |
1747 }; |
1753 }; |
1748 |
1754 |
1749 void G1CollectedHeap::object_iterate(ObjectClosure* cl) { |
1755 void G1CollectedHeap::object_iterate(ObjectClosure* cl, bool do_perm) { |
1750 IterateObjectClosureRegionClosure blk(cl); |
1756 IterateObjectClosureRegionClosure blk(cl); |
1751 _hrs->iterate(&blk); |
1757 _hrs->iterate(&blk); |
|
1758 if (do_perm) { |
|
1759 perm_gen()->object_iterate(cl); |
|
1760 } |
1752 } |
1761 } |
1753 |
1762 |
1754 void G1CollectedHeap::object_iterate_since_last_GC(ObjectClosure* cl) { |
1763 void G1CollectedHeap::object_iterate_since_last_GC(ObjectClosure* cl) { |
1755 // FIXME: is this right? |
1764 // FIXME: is this right? |
1756 guarantee(false, "object_iterate_since_last_GC not supported by G1 heap"); |
1765 guarantee(false, "object_iterate_since_last_GC not supported by G1 heap"); |
2373 void |
2382 void |
2374 G1CollectedHeap::checkConcurrentMark() { |
2383 G1CollectedHeap::checkConcurrentMark() { |
2375 VerifyMarkedObjsClosure verifycl(this); |
2384 VerifyMarkedObjsClosure verifycl(this); |
2376 // MutexLockerEx x(getMarkBitMapLock(), |
2385 // MutexLockerEx x(getMarkBitMapLock(), |
2377 // Mutex::_no_safepoint_check_flag); |
2386 // Mutex::_no_safepoint_check_flag); |
2378 object_iterate(&verifycl); |
2387 object_iterate(&verifycl, false); |
2379 } |
2388 } |
2380 |
2389 |
2381 void G1CollectedHeap::do_sync_mark() { |
2390 void G1CollectedHeap::do_sync_mark() { |
2382 _cm->checkpointRootsInitial(); |
2391 _cm->checkpointRootsInitial(); |
2383 _cm->markFromRoots(); |
2392 _cm->markFromRoots(); |