hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
changeset 35507 aa2affc60a2f
parent 35492 c8c0273e6b91
child 35532 929dfc251a28
equal deleted inserted replaced
35504:aabd81013e37 35507:aa2affc60a2f
  3533 
  3533 
  3534   // Finally flush all remembered set entries to re-check into the global DCQS.
  3534   // Finally flush all remembered set entries to re-check into the global DCQS.
  3535   cl.flush_rem_set_entries();
  3535   cl.flush_rem_set_entries();
  3536 }
  3536 }
  3537 
  3537 
       
  3538 class VerifyRegionRemSetClosure : public HeapRegionClosure {
       
  3539   public:
       
  3540     bool doHeapRegion(HeapRegion* hr) {
       
  3541       if (!hr->is_archive() && !hr->is_continues_humongous()) {
       
  3542         hr->verify_rem_set();
       
  3543       }
       
  3544       return false;
       
  3545     }
       
  3546 };
       
  3547 
  3538 #ifdef ASSERT
  3548 #ifdef ASSERT
  3539 class VerifyCSetClosure: public HeapRegionClosure {
  3549 class VerifyCSetClosure: public HeapRegionClosure {
  3540 public:
  3550 public:
  3541   bool doHeapRegion(HeapRegion* hr) {
  3551   bool doHeapRegion(HeapRegion* hr) {
  3542     // Here we check that the CSet region's RSet is ready for parallel
  3552     // Here we check that the CSet region's RSet is ready for parallel
  3721       IsGCActiveMark x;
  3731       IsGCActiveMark x;
  3722 
  3732 
  3723       gc_prologue(false);
  3733       gc_prologue(false);
  3724       increment_total_collections(false /* full gc */);
  3734       increment_total_collections(false /* full gc */);
  3725       increment_gc_time_stamp();
  3735       increment_gc_time_stamp();
       
  3736 
       
  3737       if (VerifyRememberedSets) {
       
  3738         log_info(gc, verify)("[Verifying RemSets before GC]");
       
  3739         VerifyRegionRemSetClosure v_cl;
       
  3740         heap_region_iterate(&v_cl);
       
  3741       }
  3726 
  3742 
  3727       verify_before_gc();
  3743       verify_before_gc();
  3728 
  3744 
  3729       check_bitmaps("GC Start");
  3745       check_bitmaps("GC Start");
  3730 
  3746 
  3925         // saved_mark_word() will return top() between pauses, i.e.,
  3941         // saved_mark_word() will return top() between pauses, i.e.,
  3926         // during concurrent refinement. So we don't need the
  3942         // during concurrent refinement. So we don't need the
  3927         // is_gc_active() check to decided which top to use when
  3943         // is_gc_active() check to decided which top to use when
  3928         // scanning cards (see CR 7039627).
  3944         // scanning cards (see CR 7039627).
  3929         increment_gc_time_stamp();
  3945         increment_gc_time_stamp();
       
  3946 
       
  3947         if (VerifyRememberedSets) {
       
  3948           log_info(gc, verify)("[Verifying RemSets after GC]");
       
  3949           VerifyRegionRemSetClosure v_cl;
       
  3950           heap_region_iterate(&v_cl);
       
  3951         }
  3930 
  3952 
  3931         verify_after_gc();
  3953         verify_after_gc();
  3932         check_bitmaps("GC End");
  3954         check_bitmaps("GC End");
  3933 
  3955 
  3934         assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
  3956         assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");