734 void print() const; 735 void print_on(outputStream* st) const; 736 737 // vo == UsePrevMarking -> use "prev" marking information, 738 // vo == UseNextMarking -> use "next" marking information 739 // vo == UseMarkWord -> use the mark word in the object header 740 // 741 // NOTE: Only the "prev" marking information is guaranteed to be 742 // consistent most of the time, so most calls to this should use 743 // vo == UsePrevMarking. 744 // Currently, there is only one case where this is called with 745 // vo == UseNextMarking, which is to verify the "next" marking 746 // information at the end of remark. 747 // Currently there is only one place where this is called with 748 // vo == UseMarkWord, which is to verify the marking during a 749 // full GC. 750 void verify(VerifyOption vo, bool *failures) const; 751 752 // Override; it uses the "prev" marking information 753 virtual void verify() const; 754 }; 755 756 // HeapRegionClosure is used for iterating over regions. 757 // Terminates the iteration when the "doHeapRegion" method returns "true". 758 class HeapRegionClosure : public StackObj { 759 friend class HeapRegionManager; 760 friend class G1CollectedHeap; 761 762 bool _complete; 763 void incomplete() { _complete = false; } 764 765 public: 766 HeapRegionClosure(): _complete(true) {} 767 768 // Typically called on each region until it returns true. 769 virtual bool doHeapRegion(HeapRegion* r) = 0; 770 771 // True after iteration if the closure was applied to all heap regions 772 // and returned "false" in all cases. 773 bool complete() { return _complete; } | 734 void print() const; 735 void print_on(outputStream* st) const; 736 737 // vo == UsePrevMarking -> use "prev" marking information, 738 // vo == UseNextMarking -> use "next" marking information 739 // vo == UseMarkWord -> use the mark word in the object header 740 // 741 // NOTE: Only the "prev" marking information is guaranteed to be 742 // consistent most of the time, so most calls to this should use 743 // vo == UsePrevMarking. 744 // Currently, there is only one case where this is called with 745 // vo == UseNextMarking, which is to verify the "next" marking 746 // information at the end of remark. 747 // Currently there is only one place where this is called with 748 // vo == UseMarkWord, which is to verify the marking during a 749 // full GC. 750 void verify(VerifyOption vo, bool *failures) const; 751 752 // Override; it uses the "prev" marking information 753 virtual void verify() const; 754 755 void verifyRSet(VerifyOption vo, bool *failures) 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; } |