diff -r 7a567d2cc7fb -r dae1435f96b7 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Jan 28 09:41:33 2016 +0000 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Feb 01 13:19:14 2016 -0800 @@ -3839,6 +3839,16 @@ _surviving_young_words = NULL; } +class VerifyRegionRemSetClosure : public HeapRegionClosure { + public: + bool doHeapRegion(HeapRegion* hr) { + if (!hr->continuesHumongous()) { + hr->verify_rem_set(); + } + return false; + } +}; + #ifdef ASSERT class VerifyCSetClosure: public HeapRegionClosure { public: @@ -4015,6 +4025,14 @@ increment_total_collections(false /* full gc */); increment_gc_time_stamp(); + if (VerifyRememberedSets) { + if (!VerifySilently) { + gclog_or_tty->print_cr("[Verifying RemSets before GC]"); + } + VerifyRegionRemSetClosure v_cl; + heap_region_iterate(&v_cl); + } + verify_before_gc(); check_bitmaps("GC Start"); @@ -4246,6 +4264,14 @@ // scanning cards (see CR 7039627). increment_gc_time_stamp(); + if (VerifyRememberedSets) { + if (!VerifySilently) { + gclog_or_tty->print_cr("[Verifying RemSets after GC]"); + } + VerifyRegionRemSetClosure v_cl; + heap_region_iterate(&v_cl); + } + verify_after_gc(); check_bitmaps("GC End");