< prev index next >
src/hotspot/share/gc/g1/g1HeapVerifier.hpp
Print this page
rev 48019 : 8191821: Finer granularity for GC verification
Reviewed-by:
*** 32,50 ****
class G1CollectedHeap;
class G1HeapVerifier : public CHeapObj<mtGC> {
private:
G1CollectedHeap* _g1h;
// verify_region_sets() performs verification over the region
// lists. It will be compiled in the product code to be used when
// necessary (i.e., during heap verification).
void verify_region_sets();
public:
!
! G1HeapVerifier(G1CollectedHeap* heap) : _g1h(heap) { }
// Perform verification.
// vo == UsePrevMarking -> use "prev" marking information,
// vo == UseNextMarking -> use "next" marking information
--- 32,63 ----
class G1CollectedHeap;
class G1HeapVerifier : public CHeapObj<mtGC> {
private:
G1CollectedHeap* _g1h;
+ int _enabled_verification_types;
// verify_region_sets() performs verification over the region
// lists. It will be compiled in the product code to be used when
// necessary (i.e., during heap verification).
void verify_region_sets();
public:
! enum G1VerifyType {
! G1VerifyYoung = 1,
! G1VerifyMixed = 2,
! G1VerifyRemark = 4,
! G1VerifyCleanup = 8,
! G1VerifyFull = 16,
! G1VerifyAll = -1
! };
!
! G1HeapVerifier(G1CollectedHeap* heap) : _g1h(heap), _enabled_verification_types(G1VerifyAll) { }
!
! void parse_verification_type(const char* type);
! void enable_verification_type(G1VerifyType type);
! bool should_verify(G1VerifyType type);
// Perform verification.
// vo == UsePrevMarking -> use "prev" marking information,
// vo == UseNextMarking -> use "next" marking information
*** 71,83 ****
#else // HEAP_REGION_SET_FORCE_VERIFY
void verify_region_sets_optional() { }
#endif // HEAP_REGION_SET_FORCE_VERIFY
void prepare_for_verify();
! double verify(bool guard, const char* msg);
! void verify_before_gc();
! void verify_after_gc();
#ifndef PRODUCT
// Make sure that the given bitmap has no marked objects in the
// range [from,limit). If it does, print an error message and return
// false. Otherwise, just return true. bitmap_name should be "prev"
--- 84,96 ----
#else // HEAP_REGION_SET_FORCE_VERIFY
void verify_region_sets_optional() { }
#endif // HEAP_REGION_SET_FORCE_VERIFY
void prepare_for_verify();
! double verify(G1VerifyType type, VerifyOption vo, const char* msg);
! void verify_before_gc(G1VerifyType type);
! void verify_after_gc(G1VerifyType type);
#ifndef PRODUCT
// Make sure that the given bitmap has no marked objects in the
// range [from,limit). If it does, print an error message and return
// false. Otherwise, just return true. bitmap_name should be "prev"
< prev index next >