744 // vo == UseNextMarking, which is to verify the "next" marking 745 // information at the end of remark. 746 // Currently there is only one place where this is called with 747 // vo == UseMarkWord, which is to verify the marking during a 748 // full GC. 749 void verify(VerifyOption vo, bool *failures) const; 750 751 // Override; it uses the "prev" marking information 752 virtual void verify() const; 753 754 void verify_rem_set(VerifyOption vo, bool *failures) const; 755 void verify_rem_set() const; 756 }; 757 758 // HeapRegionClosure is used for iterating over regions. 759 // Terminates the iteration when the "doHeapRegion" method returns "true". 760 class HeapRegionClosure : public StackObj { 761 friend class HeapRegionManager; 762 friend class G1CollectedHeap; 763 764 bool _complete; 765 void incomplete() { _complete = false; } 766 767 public: 768 HeapRegionClosure(): _complete(true) {} 769 770 // Typically called on each region until it returns true. 771 virtual bool doHeapRegion(HeapRegion* r) = 0; 772 773 // True after iteration if the closure was applied to all heap regions 774 // and returned "false" in all cases. 775 bool complete() { return _complete; } 776 }; 777 778 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP | 744 // vo == UseNextMarking, which is to verify the "next" marking 745 // information at the end of remark. 746 // Currently there is only one place where this is called with 747 // vo == UseMarkWord, which is to verify the marking during a 748 // full GC. 749 void verify(VerifyOption vo, bool *failures) const; 750 751 // Override; it uses the "prev" marking information 752 virtual void verify() const; 753 754 void verify_rem_set(VerifyOption vo, bool *failures) const; 755 void verify_rem_set() const; 756 }; 757 758 // HeapRegionClosure is used for iterating over regions. 759 // Terminates the iteration when the "doHeapRegion" method returns "true". 760 class HeapRegionClosure : public StackObj { 761 friend class HeapRegionManager; 762 friend class G1CollectedHeap; 763 764 public: 765 HeapRegionClosure() {} 766 767 // Typically called on each region until it returns true. 768 virtual void doHeapRegion(HeapRegion* r) = 0; 769 }; 770 771 // AbortableHeapRegionClosure is used for iterating over regions. 772 // Terminates the iteration when the "doHeapRegion" method returns "true". 773 class AbortableHeapRegionClosure : public StackObj { 774 friend class HeapRegionManager; 775 friend class G1CollectedHeap; 776 777 bool _complete; 778 void incomplete() { _complete = false; } 779 780 public: 781 AbortableHeapRegionClosure(): _complete(true) {} 782 783 //void doHeapRegion(HeapRegion* r) {} 784 785 // Typically called on each region until it returns true. 786 virtual bool doHeapRegionAbortable(HeapRegion* r) = 0; 787 788 // True after iteration if the closure was applied to all heap regions 789 // and returned "false" in all cases. 790 bool complete() { return _complete; } 791 }; 792 793 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP |