src/share/vm/gc_implementation/g1/heapRegion.hpp

Print this page




 762   void print() const;
 763   void print_on(outputStream* st) const;
 764 
 765   // vo == UsePrevMarking  -> use "prev" marking information,
 766   // vo == UseNextMarking -> use "next" marking information
 767   // vo == UseMarkWord    -> use the mark word in the object header
 768   //
 769   // NOTE: Only the "prev" marking information is guaranteed to be
 770   // consistent most of the time, so most calls to this should use
 771   // vo == UsePrevMarking.
 772   // Currently, there is only one case where this is called with
 773   // vo == UseNextMarking, which is to verify the "next" marking
 774   // information at the end of remark.
 775   // Currently there is only one place where this is called with
 776   // vo == UseMarkWord, which is to verify the marking during a
 777   // full GC.
 778   void verify(VerifyOption vo, bool *failures) const;
 779 
 780   // Override; it uses the "prev" marking information
 781   virtual void verify() const;



 782 };
 783 
 784 // HeapRegionClosure is used for iterating over regions.
 785 // Terminates the iteration when the "doHeapRegion" method returns "true".
 786 class HeapRegionClosure : public StackObj {
 787   friend class HeapRegionManager;
 788   friend class G1CollectedHeap;
 789 
 790   bool _complete;
 791   void incomplete() { _complete = false; }
 792 
 793  public:
 794   HeapRegionClosure(): _complete(true) {}
 795 
 796   // Typically called on each region until it returns true.
 797   virtual bool doHeapRegion(HeapRegion* r) = 0;
 798 
 799   // True after iteration if the closure was applied to all heap regions
 800   // and returned "false" in all cases.
 801   bool complete() { return _complete; }


 762   void print() const;
 763   void print_on(outputStream* st) const;
 764 
 765   // vo == UsePrevMarking  -> use "prev" marking information,
 766   // vo == UseNextMarking -> use "next" marking information
 767   // vo == UseMarkWord    -> use the mark word in the object header
 768   //
 769   // NOTE: Only the "prev" marking information is guaranteed to be
 770   // consistent most of the time, so most calls to this should use
 771   // vo == UsePrevMarking.
 772   // Currently, there is only one case where this is called with
 773   // vo == UseNextMarking, which is to verify the "next" marking
 774   // information at the end of remark.
 775   // Currently there is only one place where this is called with
 776   // vo == UseMarkWord, which is to verify the marking during a
 777   // full GC.
 778   void verify(VerifyOption vo, bool *failures) const;
 779 
 780   // Override; it uses the "prev" marking information
 781   virtual void verify() const;
 782 
 783   void verify_rem_set(VerifyOption vo, bool *failures) const;
 784   void verify_rem_set() const;
 785 };
 786 
 787 // HeapRegionClosure is used for iterating over regions.
 788 // Terminates the iteration when the "doHeapRegion" method returns "true".
 789 class HeapRegionClosure : public StackObj {
 790   friend class HeapRegionManager;
 791   friend class G1CollectedHeap;
 792 
 793   bool _complete;
 794   void incomplete() { _complete = false; }
 795 
 796  public:
 797   HeapRegionClosure(): _complete(true) {}
 798 
 799   // Typically called on each region until it returns true.
 800   virtual bool doHeapRegion(HeapRegion* r) = 0;
 801 
 802   // True after iteration if the closure was applied to all heap regions
 803   // and returned "false" in all cases.
 804   bool complete() { return _complete; }