717 // consistent most of the time, so most calls to this should use
718 // vo == UsePrevMarking.
719 // Currently, there is only one case where this is called with
720 // vo == UseNextMarking, which is to verify the "next" marking
721 // information at the end of remark.
722 // Currently there is only one place where this is called with
723 // vo == UseMarkWord, which is to verify the marking during a
724 // full GC.
725 void verify(VerifyOption vo, bool *failures) const;
726
727 // Override; it uses the "prev" marking information
728 virtual void verify() const;
729
730 void verify_rem_set(VerifyOption vo, bool *failures) const;
731 void verify_rem_set() const;
732 };
733
734 // HeapRegionClosure is used for iterating over regions.
735 // Terminates the iteration when the "doHeapRegion" method returns "true".
736 class HeapRegionClosure : public StackObj {
737 bool _complete;
738 public:
739 HeapRegionClosure(): _complete(true) {}
740
741 void incomplete() { _complete = false; }
742
743 // Typically called on each region until it returns true.
744 virtual bool doHeapRegion(HeapRegion* r) = 0;
745
746 // True after iteration if the closure was applied to all heap regions
747 // and returned "false" in all cases.
748 bool complete() { return _complete; }
749 };
750
751 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP
|
717 // consistent most of the time, so most calls to this should use
718 // vo == UsePrevMarking.
719 // Currently, there is only one case where this is called with
720 // vo == UseNextMarking, which is to verify the "next" marking
721 // information at the end of remark.
722 // Currently there is only one place where this is called with
723 // vo == UseMarkWord, which is to verify the marking during a
724 // full GC.
725 void verify(VerifyOption vo, bool *failures) const;
726
727 // Override; it uses the "prev" marking information
728 virtual void verify() const;
729
730 void verify_rem_set(VerifyOption vo, bool *failures) const;
731 void verify_rem_set() const;
732 };
733
734 // HeapRegionClosure is used for iterating over regions.
735 // Terminates the iteration when the "doHeapRegion" method returns "true".
736 class HeapRegionClosure : public StackObj {
737 friend class HeapRegionManager;
738 friend class G1CollectionSet;
739
740 bool _complete;
741 void incomplete() { _complete = false; }
742
743 public:
744 HeapRegionClosure(): _complete(true) {}
745
746 // Typically called on each region until it returns true.
747 virtual bool doHeapRegion(HeapRegion* r) = 0;
748
749 // True after iteration if the closure was applied to all heap regions
750 // and returned "false" in all cases.
751 bool complete() { return _complete; }
752 };
753
754 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP
|