< 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

*** 1081,1091 **** void G1CollectedHeap::print_hrm_post_compaction() { if (_hr_printer.is_active()) { PostCompactionPrinterClosure cl(hr_printer()); heap_region_iterate(&cl); } - } 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 --- 1081,1090 ----
*** 1130,1140 **** void G1CollectedHeap::verify_before_full_collection(bool explicit_gc) { 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->check_bitmaps("Full GC Start"); } void G1CollectedHeap::prepare_heap_for_mutators() { // Delete metaspaces for unloaded class loaders and clean up loader_data graph --- 1129,1139 ---- void G1CollectedHeap::verify_before_full_collection(bool explicit_gc) { 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(G1HeapVerifier::G1VerifyFull); _verifier->check_bitmaps("Full GC Start"); } void G1CollectedHeap::prepare_heap_for_mutators() { // Delete metaspaces for unloaded class loaders and clean up loader_data graph
*** 1171,1181 **** void G1CollectedHeap::verify_after_full_collection() { check_gc_time_stamps(); _hrm.verify_optional(); _verifier->verify_region_sets_optional(); ! _verifier->verify_after_gc(); // 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 // objects marked during a full GC against the previous bitmap. // But we need to clear it before calling check_bitmaps below since --- 1170,1180 ---- void G1CollectedHeap::verify_after_full_collection() { check_gc_time_stamps(); _hrm.verify_optional(); _verifier->verify_region_sets_optional(); ! _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 // objects marked during a full GC against the previous bitmap. // But we need to clear it before calling check_bitmaps below since
*** 2935,2951 **** --- 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(),
*** 2982,2992 **** log_info(gc, verify)("[Verifying RemSets before GC]"); VerifyRegionRemSetClosure v_cl; heap_region_iterate(&v_cl); } ! _verifier->verify_before_gc(); _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();
*** 3142,3152 **** log_info(gc, verify)("[Verifying RemSets after GC]"); VerifyRegionRemSetClosure v_cl; heap_region_iterate(&v_cl); } ! _verifier->verify_after_gc(); _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 >