src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 8287
dae1435f96b7
parent 8280
f3f2f71d2dc8
child 8310
6c57a16d0238
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jan 28 09:41:33 2016 +0000
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Mon Feb 01 13:19:14 2016 -0800
     1.3 @@ -3839,6 +3839,16 @@
     1.4    _surviving_young_words = NULL;
     1.5  }
     1.6  
     1.7 +class VerifyRegionRemSetClosure : public HeapRegionClosure {
     1.8 +  public:
     1.9 +    bool doHeapRegion(HeapRegion* hr) {
    1.10 +      if (!hr->continuesHumongous()) {
    1.11 +        hr->verify_rem_set();
    1.12 +      }
    1.13 +      return false;
    1.14 +    }
    1.15 +};
    1.16 +
    1.17  #ifdef ASSERT
    1.18  class VerifyCSetClosure: public HeapRegionClosure {
    1.19  public:
    1.20 @@ -4015,6 +4025,14 @@
    1.21        increment_total_collections(false /* full gc */);
    1.22        increment_gc_time_stamp();
    1.23  
    1.24 +      if (VerifyRememberedSets) {
    1.25 +        if (!VerifySilently) {
    1.26 +          gclog_or_tty->print_cr("[Verifying RemSets before GC]");
    1.27 +        }
    1.28 +        VerifyRegionRemSetClosure v_cl;
    1.29 +        heap_region_iterate(&v_cl);
    1.30 +      }
    1.31 +
    1.32        verify_before_gc();
    1.33        check_bitmaps("GC Start");
    1.34  
    1.35 @@ -4246,6 +4264,14 @@
    1.36          // scanning cards (see CR 7039627).
    1.37          increment_gc_time_stamp();
    1.38  
    1.39 +        if (VerifyRememberedSets) {
    1.40 +          if (!VerifySilently) {
    1.41 +            gclog_or_tty->print_cr("[Verifying RemSets after GC]");
    1.42 +          }
    1.43 +          VerifyRegionRemSetClosure v_cl;
    1.44 +          heap_region_iterate(&v_cl);
    1.45 +        }
    1.46 +
    1.47          verify_after_gc();
    1.48          check_bitmaps("GC End");
    1.49  

mercurial