< 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
rev 48021 : [mq]: 8191821-rev-tsch

*** 1083,1100 **** 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 // could consider timing and reporting how long we wait in the // following two methods. --- 1083,1092 ----
*** 2942,2958 **** --- 2934,2954 ---- _gc_tracer_stw->report_yc_type(collector_state()->yc_type()); 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); uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(), workers()->active_workers(),
*** 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(); --- 2985,2995 ---- log_info(gc, verify)("[Verifying RemSets before GC]"); VerifyRegionRemSetClosure v_cl; heap_region_iterate(&v_cl); } ! _verifier->verify_before_gc(verify_type); _verifier->check_bitmaps("GC Start"); #if COMPILER2_OR_JVMCI DerivedPointerTable::clear();
*** 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(); --- 3145,3155 ---- log_info(gc, verify)("[Verifying RemSets after GC]"); VerifyRegionRemSetClosure v_cl; heap_region_iterate(&v_cl); } ! _verifier->verify_after_gc(verify_type); _verifier->check_bitmaps("GC End"); assert(!ref_processor_stw()->discovery_enabled(), "Postcondition"); ref_processor_stw()->verify_no_references_recorded();
< prev index next >