1062 _hot_card_cache->reset_hot_cache();
1063 }
1064
1065 // Discard all remembered set updates.
1066 G1BarrierSet::dirty_card_queue_set().abandon_logs();
1067 assert(dirty_card_queue_set().completed_buffers_num() == 0, "DCQS should be empty");
1068 }
1069
1070 void G1CollectedHeap::verify_after_full_collection() {
1071 _hrm.verify_optional();
1072 _verifier->verify_region_sets_optional();
1073 _verifier->verify_after_gc(G1HeapVerifier::G1VerifyFull);
1074 // Clear the previous marking bitmap, if needed for bitmap verification.
1075 // Note we cannot do this when we clear the next marking bitmap in
1076 // G1ConcurrentMark::abort() above since VerifyDuringGC verifies the
1077 // objects marked during a full GC against the previous bitmap.
1078 // But we need to clear it before calling check_bitmaps below since
1079 // the full GC has compacted objects and updated TAMS but not updated
1080 // the prev bitmap.
1081 if (G1VerifyBitmaps) {
1082 GCTraceTime(Debug, gc)("Clear Bitmap for Verification");
1083 _cm->clear_prev_bitmap(workers());
1084 }
1085 _verifier->check_bitmaps("Full GC End");
1086
1087 // At this point there should be no regions in the
1088 // entire heap tagged as young.
1089 assert(check_young_list_empty(), "young list should be empty at this point");
1090
1091 // Note: since we've just done a full GC, concurrent
1092 // marking is no longer active. Therefore we need not
1093 // re-enable reference discovery for the CM ref processor.
1094 // That will be done at the start of the next marking cycle.
1095 // We also know that the STW processor should no longer
1096 // discover any new references.
1097 assert(!_ref_processor_stw->discovery_enabled(), "Postcondition");
1098 assert(!_ref_processor_cm->discovery_enabled(), "Postcondition");
1099 _ref_processor_stw->verify_no_references_recorded();
1100 _ref_processor_cm->verify_no_references_recorded();
1101 }
1102
1103 void G1CollectedHeap::print_heap_after_full_collection(G1HeapTransition* heap_transition) {
1104 // Post collection logging.
|
1062 _hot_card_cache->reset_hot_cache();
1063 }
1064
1065 // Discard all remembered set updates.
1066 G1BarrierSet::dirty_card_queue_set().abandon_logs();
1067 assert(dirty_card_queue_set().completed_buffers_num() == 0, "DCQS should be empty");
1068 }
1069
1070 void G1CollectedHeap::verify_after_full_collection() {
1071 _hrm.verify_optional();
1072 _verifier->verify_region_sets_optional();
1073 _verifier->verify_after_gc(G1HeapVerifier::G1VerifyFull);
1074 // Clear the previous marking bitmap, if needed for bitmap verification.
1075 // Note we cannot do this when we clear the next marking bitmap in
1076 // G1ConcurrentMark::abort() above since VerifyDuringGC verifies the
1077 // objects marked during a full GC against the previous bitmap.
1078 // But we need to clear it before calling check_bitmaps below since
1079 // the full GC has compacted objects and updated TAMS but not updated
1080 // the prev bitmap.
1081 if (G1VerifyBitmaps) {
1082 GCTraceTime(Debug, gc)("Clear Prev Bitmap for Verification");
1083 _cm->clear_prev_bitmap(workers());
1084 }
1085 // This call implicitly verifies that the next bitmap is clear after Full GC.
1086 _verifier->check_bitmaps("Full GC End");
1087
1088 // At this point there should be no regions in the
1089 // entire heap tagged as young.
1090 assert(check_young_list_empty(), "young list should be empty at this point");
1091
1092 // Note: since we've just done a full GC, concurrent
1093 // marking is no longer active. Therefore we need not
1094 // re-enable reference discovery for the CM ref processor.
1095 // That will be done at the start of the next marking cycle.
1096 // We also know that the STW processor should no longer
1097 // discover any new references.
1098 assert(!_ref_processor_stw->discovery_enabled(), "Postcondition");
1099 assert(!_ref_processor_cm->discovery_enabled(), "Postcondition");
1100 _ref_processor_stw->verify_no_references_recorded();
1101 _ref_processor_cm->verify_no_references_recorded();
1102 }
1103
1104 void G1CollectedHeap::print_heap_after_full_collection(G1HeapTransition* heap_transition) {
1105 // Post collection logging.
|