< prev index next >

src/hotspot/share/gc/g1/heapRegion.hpp

Print this page




 702   //
 703   // NOTE: Only the "prev" marking information is guaranteed to be
 704   // consistent most of the time, so most calls to this should use
 705   // vo == UsePrevMarking.
 706   // Currently, there is only one case where this is called with
 707   // vo == UseNextMarking, which is to verify the "next" marking
 708   // information at the end of remark.
 709   // Currently there is only one place where this is called with
 710   // vo == UseFullMarking, which is to verify the marking during a
 711   // full GC.
 712   void verify(VerifyOption vo, bool *failures) const;
 713 
 714   // Override; it uses the "prev" marking information
 715   virtual void verify() const;
 716 
 717   void verify_rem_set(VerifyOption vo, bool *failures) const;
 718   void verify_rem_set() const;
 719 };
 720 
 721 // HeapRegionClosure is used for iterating over regions.
 722 // Terminates the iteration when the "do_heap_region" method returns "true".
 723 class HeapRegionClosure : public StackObj {
 724   friend class HeapRegionManager;
 725   friend class G1CollectionSet;
 726 
 727   bool _is_complete;
 728   void set_incomplete() { _is_complete = false; }
 729 
 730  public:
 731   HeapRegionClosure(): _is_complete(true) {}
 732 
 733   // Typically called on each region until it returns true.
 734   virtual bool do_heap_region(HeapRegion* r) = 0;
 735 
 736   // True after iteration if the closure was applied to all heap regions
 737   // and returned "false" in all cases.
 738   bool is_complete() { return _is_complete; }
 739 };
 740 
 741 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP


 702   //
 703   // NOTE: Only the "prev" marking information is guaranteed to be
 704   // consistent most of the time, so most calls to this should use
 705   // vo == UsePrevMarking.
 706   // Currently, there is only one case where this is called with
 707   // vo == UseNextMarking, which is to verify the "next" marking
 708   // information at the end of remark.
 709   // Currently there is only one place where this is called with
 710   // vo == UseFullMarking, which is to verify the marking during a
 711   // full GC.
 712   void verify(VerifyOption vo, bool *failures) const;
 713 
 714   // Override; it uses the "prev" marking information
 715   virtual void verify() const;
 716 
 717   void verify_rem_set(VerifyOption vo, bool *failures) const;
 718   void verify_rem_set() const;
 719 };
 720 
 721 // HeapRegionClosure is used for iterating over regions.
 722 // Terminates the iteration when the "doHeapRegion" method returns "true".
 723 class HeapRegionClosure : public StackObj {
 724   friend class HeapRegionManager;
 725   friend class G1CollectionSet;
 726 
 727   bool _complete;
 728   void incomplete() { _complete = false; }
 729 
 730  public:
 731   HeapRegionClosure(): _complete(true) {}
 732 
 733   // Typically called on each region until it returns true.
 734   virtual bool doHeapRegion(HeapRegion* r) = 0;
 735 
 736   // True after iteration if the closure was applied to all heap regions
 737   // and returned "false" in all cases.
 738   bool complete() { return _complete; }
 739 };
 740 
 741 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP
< prev index next >