8269294: Verify_before/after_young_collection should execute all verification

Reviewed-by: iwalulya, kbarrett
This commit is contained in:
Thomas Schatzl 2021-07-07 07:56:41 +00:00
parent 18b80c70f8
commit 248aa5014b

View File

@ -2839,6 +2839,8 @@ G1HeapVerifier::G1VerifyType G1CollectedHeap::young_collection_verify_type() con
}
void G1CollectedHeap::verify_before_young_collection(G1HeapVerifier::G1VerifyType type) {
_verifier->verify_region_sets_optional();
_verifier->verify_dirty_young_regions();
if (VerifyRememberedSets) {
log_info(gc, verify)("[Verifying RemSets before GC]");
VerifyRegionRemSetClosure v_cl;
@ -2861,6 +2863,7 @@ void G1CollectedHeap::verify_after_young_collection(G1HeapVerifier::G1VerifyType
_verifier->verify_after_gc(type);
_verifier->check_bitmaps("GC End");
verify_numa_regions("GC End");
_verifier->verify_region_sets_optional();
}
void G1CollectedHeap::expand_heap_after_young_collection(){
@ -2959,9 +2962,6 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus
print_heap_regions();
trace_heap_before_gc(_gc_tracer_stw);
_verifier->verify_region_sets_optional();
_verifier->verify_dirty_young_regions();
// We should not be doing concurrent start unless the concurrent mark thread is running
if (!_cm_thread->should_terminate()) {
// This call will decide whether this pause is a concurrent start
@ -3082,9 +3082,6 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus
policy()->print_phases();
heap_transition.print();
_hrm.verify_optional();
_verifier->verify_region_sets_optional();
TASKQUEUE_STATS_ONLY(print_taskqueue_stats());
TASKQUEUE_STATS_ONLY(reset_taskqueue_stats());