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

Print this page
rev 6586 : 8047819: G1 HeapRegionDCTOC does not need to inherit ContiguousSpaceDCTOC
Reviewed-by:

*** 46,56 **** HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1, HeapRegion* hr, ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, FilterKind fk) : ! ContiguousSpaceDCTOC(hr, cl, precision, NULL), _hr(hr), _fk(fk), _g1(g1) { } FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r, OopClosure* oc) : _r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { } --- 46,56 ---- HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1, HeapRegion* hr, ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, FilterKind fk) : ! DirtyCardToOopClosure(hr, cl, precision, NULL), _hr(hr), _fk(fk), _g1(g1) { } FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r, OopClosure* oc) : _r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { }
*** 75,97 **** next_obj = cur + oop_size; } return cur; } ! void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr, HeapWord* bottom, ! HeapWord* top, ! ExtendedOopClosure* cl) { G1CollectedHeap* g1h = _g1; int oop_size; ExtendedOopClosure* cl2 = NULL; ! FilterIntoCSClosure intoCSFilt(this, g1h, cl); ! FilterOutOfRegionClosure outOfRegionFilt(_hr, cl); switch (_fk) { ! case NoFilterKind: cl2 = cl; break; case IntoCSFilterKind: cl2 = &intoCSFilt; break; case OutOfRegionFilterKind: cl2 = &outOfRegionFilt; break; default: ShouldNotReachHere(); } --- 75,96 ---- next_obj = cur + oop_size; } return cur; } ! void HeapRegionDCTOC::walk_mem_region(MemRegion mr, HeapWord* bottom, ! HeapWord* top) { G1CollectedHeap* g1h = _g1; int oop_size; ExtendedOopClosure* cl2 = NULL; ! FilterIntoCSClosure intoCSFilt(this, g1h, _cl); ! FilterOutOfRegionClosure outOfRegionFilt(_hr, _cl); switch (_fk) { ! case NoFilterKind: cl2 = _cl; break; case IntoCSFilterKind: cl2 = &intoCSFilt; break; case OutOfRegionFilterKind: cl2 = &outOfRegionFilt; break; default: ShouldNotReachHere(); }
*** 109,129 **** if (bottom < top) { // We replicate the loop below for several kinds of possible filters. switch (_fk) { case NoFilterKind: ! bottom = walk_mem_region_loop(cl, g1h, _hr, bottom, top); break; case IntoCSFilterKind: { ! FilterIntoCSClosure filt(this, g1h, cl); bottom = walk_mem_region_loop(&filt, g1h, _hr, bottom, top); break; } case OutOfRegionFilterKind: { ! FilterOutOfRegionClosure filt(_hr, cl); bottom = walk_mem_region_loop(&filt, g1h, _hr, bottom, top); break; } default: --- 108,128 ---- if (bottom < top) { // We replicate the loop below for several kinds of possible filters. switch (_fk) { case NoFilterKind: ! bottom = walk_mem_region_loop(_cl, g1h, _hr, bottom, top); break; case IntoCSFilterKind: { ! FilterIntoCSClosure filt(this, g1h, _cl); bottom = walk_mem_region_loop(&filt, g1h, _hr, bottom, top); break; } case OutOfRegionFilterKind: { ! FilterOutOfRegionClosure filt(_hr, _cl); bottom = walk_mem_region_loop(&filt, g1h, _hr, bottom, top); break; } default: