< prev index next >

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

Print this page
rev 50631 : [mq]: 8204084-gtest-fixes


  25 #ifndef SHARE_VM_GC_G1_G1HEAPVERIFIER_HPP
  26 #define SHARE_VM_GC_G1_G1HEAPVERIFIER_HPP
  27 
  28 #include "gc/g1/heapRegionSet.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "memory/universe.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class G1CollectedHeap;
  34 
  35 class G1HeapVerifier : public CHeapObj<mtGC> {
  36 private:
  37   static int _enabled_verification_types;
  38 
  39   G1CollectedHeap* _g1h;
  40 
  41   void verify_region_sets();
  42 
  43 public:
  44   enum G1VerifyType {
  45     G1VerifyYoungOnly   =  1, // -XX:VerifyGCType=young-only
  46     G1VerifyInitialMark =  2, // -XX:VerifyGCType=initial-mark
  47     G1VerifyMixed       =  4, // -XX:VerifyGCType=mixed
  48     G1VerifyRemark      =  8, // -XX:VerifyGCType=remark
  49     G1VerifyCleanup     = 16, // -XX:VerifyGCType=cleanup
  50     G1VerifyFull        = 32, // -XX:VerifyGCType=full
  51     G1VerifyAll         = -1
  52   };
  53 
  54   G1HeapVerifier(G1CollectedHeap* heap) : _g1h(heap) {}
  55 
  56   static void enable_verification_type(G1VerifyType type);
  57   static bool should_verify(G1VerifyType type);
  58 
  59   // Perform verification.
  60 
  61   // vo == UsePrevMarking -> use "prev" marking information,
  62   // vo == UseNextMarking -> use "next" marking information
  63   // vo == UseFullMarking -> use "next" marking bitmap but no TAMS
  64   //
  65   // NOTE: Only the "prev" marking information is guaranteed to be
  66   // consistent most of the time, so most calls to this should use




  25 #ifndef SHARE_VM_GC_G1_G1HEAPVERIFIER_HPP
  26 #define SHARE_VM_GC_G1_G1HEAPVERIFIER_HPP
  27 
  28 #include "gc/g1/heapRegionSet.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "memory/universe.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class G1CollectedHeap;
  34 
  35 class G1HeapVerifier : public CHeapObj<mtGC> {
  36 private:
  37   static int _enabled_verification_types;
  38 
  39   G1CollectedHeap* _g1h;
  40 
  41   void verify_region_sets();
  42 
  43 public:
  44   enum G1VerifyType {
  45     G1VerifyYoungNormal     =  1, // -XX:VerifyGCType=young-normal
  46     G1VerifyConcurrentStart =  2, // -XX:VerifyGCType=concurrent-start
  47     G1VerifyMixed           =  4, // -XX:VerifyGCType=mixed
  48     G1VerifyRemark          =  8, // -XX:VerifyGCType=remark
  49     G1VerifyCleanup         = 16, // -XX:VerifyGCType=cleanup
  50     G1VerifyFull            = 32, // -XX:VerifyGCType=full
  51     G1VerifyAll             = -1
  52   };
  53 
  54   G1HeapVerifier(G1CollectedHeap* heap) : _g1h(heap) {}
  55 
  56   static void enable_verification_type(G1VerifyType type);
  57   static bool should_verify(G1VerifyType type);
  58 
  59   // Perform verification.
  60 
  61   // vo == UsePrevMarking -> use "prev" marking information,
  62   // vo == UseNextMarking -> use "next" marking information
  63   // vo == UseFullMarking -> use "next" marking bitmap but no TAMS
  64   //
  65   // NOTE: Only the "prev" marking information is guaranteed to be
  66   // consistent most of the time, so most calls to this should use


< prev index next >