src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
*** 3636,3645 ****
--- 3636,3656 ----
// Finally flush all remembered set entries to re-check into the global DCQS.
cl.flush_rem_set_entries();
}
+ class VerifyRegionRSetClosure : public HeapRegionClosure {
+ public:
+ bool doHeapRegion(HeapRegion* hr) {
+ if (!hr->is_archive() && !hr->is_continues_humongous()) {
+ bool dummy = false;
+ hr->verifyRSet(VerifyOption_G1UsePrevMarking, &dummy);
+ }
+ return false;
+ }
+ };
+
#ifdef ASSERT
class VerifyCSetClosure: public HeapRegionClosure {
public:
bool doHeapRegion(HeapRegion* hr) {
// Here we check that the CSet region's RSet is ready for parallel
*** 4044,4053 ****
--- 4055,4070 ----
// during concurrent refinement. So we don't need the
// is_gc_active() check to decided which top to use when
// scanning cards (see CR 7039627).
increment_gc_time_stamp();
+ if (G1VerifyRSetsAfterEvacuationPause) {
+ gclog_or_tty->print("[Verifying RSets]");
+ VerifyRegionRSetClosure v_cl;
+ heap_region_iterate(&v_cl);
+ }
+
verify_after_gc();
check_bitmaps("GC End");
assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
ref_processor_stw()->verify_no_references_recorded();