hotspot/src/share/vm/gc/g1/g1HeapVerifier.cpp
changeset 39698 4016de4e596b
parent 38186 ccaa890f8617
child 46285 5b673a9fa682
equal deleted inserted replaced
39697:1f34864a0347 39698:4016de4e596b
   578   } else {
   578   } else {
   579     ct_bs->verify_dirty_region(mr);
   579     ct_bs->verify_dirty_region(mr);
   580   }
   580   }
   581 }
   581 }
   582 
   582 
   583 void G1HeapVerifier::verify_dirty_young_list(HeapRegion* head) {
   583 class G1VerifyDirtyYoungListClosure : public HeapRegionClosure {
   584   G1SATBCardTableModRefBS* ct_bs = _g1h->g1_barrier_set();
   584 private:
   585   for (HeapRegion* hr = head; hr != NULL; hr = hr->next_in_collection_set()) {
   585   G1HeapVerifier* _verifier;
   586     verify_dirty_region(hr);
   586 public:
   587   }
   587   G1VerifyDirtyYoungListClosure(G1HeapVerifier* verifier) : HeapRegionClosure(), _verifier(verifier) { }
   588 }
   588   virtual bool doHeapRegion(HeapRegion* r) {
       
   589     _verifier->verify_dirty_region(r);
       
   590     return false;
       
   591   }
       
   592 };
   589 
   593 
   590 void G1HeapVerifier::verify_dirty_young_regions() {
   594 void G1HeapVerifier::verify_dirty_young_regions() {
   591   verify_dirty_young_list(_g1h->collection_set()->inc_head());
   595   G1VerifyDirtyYoungListClosure cl(this);
       
   596   _g1h->collection_set()->iterate(&cl);
   592 }
   597 }
   593 
   598 
   594 bool G1HeapVerifier::verify_no_bits_over_tams(const char* bitmap_name, G1CMBitMapRO* bitmap,
   599 bool G1HeapVerifier::verify_no_bits_over_tams(const char* bitmap_name, G1CMBitMapRO* bitmap,
   595                                                HeapWord* tams, HeapWord* end) {
   600                                                HeapWord* tams, HeapWord* end) {
   596   guarantee(tams <= end,
   601   guarantee(tams <= end,