< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 48019 : 8191821: Finer granularity for GC verification
Reviewed-by:
rev 48020 : [mq]: 8191821-rev-sang-poonam
*** 1081,1091 ****
--- 1081,1098 ----
void G1CollectedHeap::print_hrm_post_compaction() {
if (_hr_printer.is_active()) {
PostCompactionPrinterClosure cl(hr_printer());
heap_region_iterate(&cl);
}
+ }
+ G1HeapVerifier::G1VerifyType G1CollectedHeap::young_verification_type() {
+ if (collector_state()->yc_type() == Mixed) {
+ return G1HeapVerifier::G1VerifyMixed;
+ } else {
+ return G1HeapVerifier::G1VerifyYoung;
+ }
}
void G1CollectedHeap::abort_concurrent_cycle() {
// Note: When we have a more flexible GC logging framework that
// allows us to add optional attributes to a GC log record we
*** 2982,2992 ****
log_info(gc, verify)("[Verifying RemSets before GC]");
VerifyRegionRemSetClosure v_cl;
heap_region_iterate(&v_cl);
}
! _verifier->verify_before_gc(collector_state()->yc_type() == Mixed ? G1HeapVerifier::G1VerifyMixed : G1HeapVerifier::G1VerifyYoung);
_verifier->check_bitmaps("GC Start");
#if COMPILER2_OR_JVMCI
DerivedPointerTable::clear();
--- 2989,2999 ----
log_info(gc, verify)("[Verifying RemSets before GC]");
VerifyRegionRemSetClosure v_cl;
heap_region_iterate(&v_cl);
}
! _verifier->verify_before_gc(young_verification_type());
_verifier->check_bitmaps("GC Start");
#if COMPILER2_OR_JVMCI
DerivedPointerTable::clear();
*** 3142,3152 ****
log_info(gc, verify)("[Verifying RemSets after GC]");
VerifyRegionRemSetClosure v_cl;
heap_region_iterate(&v_cl);
}
! _verifier->verify_after_gc(collector_state()->yc_type() == Mixed ? G1HeapVerifier::G1VerifyMixed : G1HeapVerifier::G1VerifyYoung);
_verifier->check_bitmaps("GC End");
assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
ref_processor_stw()->verify_no_references_recorded();
--- 3149,3159 ----
log_info(gc, verify)("[Verifying RemSets after GC]");
VerifyRegionRemSetClosure v_cl;
heap_region_iterate(&v_cl);
}
! _verifier->verify_after_gc(young_verification_type());
_verifier->check_bitmaps("GC End");
assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
ref_processor_stw()->verify_no_references_recorded();
< prev index next >