--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-29 12:36:30.676700830 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-29 12:36:30.448691770 +0100 @@ -1083,7 +1083,14 @@ 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() { @@ -2984,7 +2991,7 @@ heap_region_iterate(&v_cl); } - _verifier->verify_before_gc(collector_state()->yc_type() == Mixed ? G1HeapVerifier::G1VerifyMixed : G1HeapVerifier::G1VerifyYoung); + _verifier->verify_before_gc(young_verification_type()); _verifier->check_bitmaps("GC Start"); @@ -3144,7 +3151,7 @@ heap_region_iterate(&v_cl); } - _verifier->verify_after_gc(collector_state()->yc_type() == Mixed ? G1HeapVerifier::G1VerifyMixed : G1HeapVerifier::G1VerifyYoung); + _verifier->verify_after_gc(young_verification_type()); _verifier->check_bitmaps("GC End"); assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");