--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-29 16:40:34.199033570 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-29 16:40:33.923022661 +0100 @@ -1083,7 +1083,6 @@ PostCompactionPrinterClosure cl(hr_printer()); heap_region_iterate(&cl); } - } void G1CollectedHeap::abort_concurrent_cycle() { @@ -1132,7 +1131,7 @@ assert(!GCCause::is_user_requested_gc(gc_cause()) || explicit_gc, "invariant"); assert(used() == recalculate_used(), "Should be equal"); _verifier->verify_region_sets_optional(); - _verifier->verify_before_gc(); + _verifier->verify_before_gc(G1HeapVerifier::G1VerifyFull); _verifier->check_bitmaps("Full GC Start"); } @@ -1173,7 +1172,7 @@ check_gc_time_stamps(); _hrm.verify_optional(); _verifier->verify_region_sets_optional(); - _verifier->verify_after_gc(); + _verifier->verify_after_gc(G1HeapVerifier::G1VerifyFull); // Clear the previous marking bitmap, if needed for bitmap verification. // Note we cannot do this when we clear the next marking bitmap in // G1ConcurrentMark::abort() above since VerifyDuringGC verifies the @@ -2937,13 +2936,17 @@ GCTraceCPUTime tcpu; + G1HeapVerifier::G1VerifyType verify_type; FormatBuffer<> gc_string("Pause "); if (collector_state()->during_initial_mark_pause()) { gc_string.append("Initial Mark"); + verify_type = G1HeapVerifier::G1VerifyInitialMark; } else if (collector_state()->gcs_are_young()) { gc_string.append("Young"); + verify_type = G1HeapVerifier::G1VerifyYoungOnly; } else { gc_string.append("Mixed"); + verify_type = G1HeapVerifier::G1VerifyMixed; } GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true); @@ -2984,7 +2987,7 @@ heap_region_iterate(&v_cl); } - _verifier->verify_before_gc(); + _verifier->verify_before_gc(verify_type); _verifier->check_bitmaps("GC Start"); @@ -3144,7 +3147,7 @@ heap_region_iterate(&v_cl); } - _verifier->verify_after_gc(); + _verifier->verify_after_gc(verify_type); _verifier->check_bitmaps("GC End"); assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");