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

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

*** 69,79 **** // A dirty card to oop closure for heap regions. It // knows how to get the G1 heap and how to use the bitmap // in the concurrent marker used by G1 to filter remembered // sets. ! class HeapRegionDCTOC : public ContiguousSpaceDCTOC { public: // Specification of possible DirtyCardToOopClosure filtering. enum FilterKind { NoFilterKind, IntoCSFilterKind, --- 69,79 ---- // A dirty card to oop closure for heap regions. It // knows how to get the G1 heap and how to use the bitmap // in the concurrent marker used by G1 to filter remembered // sets. ! class HeapRegionDCTOC : public DirtyCardToOopClosure { public: // Specification of possible DirtyCardToOopClosure filtering. enum FilterKind { NoFilterKind, IntoCSFilterKind,
*** 83,125 **** protected: HeapRegion* _hr; FilterKind _fk; G1CollectedHeap* _g1; - void walk_mem_region_with_cl(MemRegion mr, - HeapWord* bottom, HeapWord* top, - ExtendedOopClosure* cl); - - // We don't specialize this for FilteringClosure; filtering is handled by - // the "FilterKind" mechanism. But we provide this to avoid a compiler - // warning. - void walk_mem_region_with_cl(MemRegion mr, - HeapWord* bottom, HeapWord* top, - FilteringClosure* cl) { - HeapRegionDCTOC::walk_mem_region_with_cl(mr, bottom, top, - (ExtendedOopClosure*)cl); - } - - // Get the actual top of the area on which the closure will - // operate, given where the top is assumed to be (the end of the - // memory region passed to do_MemRegion) and where the object - // at the top is assumed to start. For example, an object may - // start at the top but actually extend past the assumed top, - // in which case the top becomes the end of the object. - HeapWord* get_actual_top(HeapWord* top, HeapWord* top_obj) { - return ContiguousSpaceDCTOC::get_actual_top(top, top_obj); - } - // Walk the given memory region from bottom to (actual) top // looking for objects and applying the oop closure (_cl) to // them. The base implementation of this treats the area as // blocks, where a block may or may not be an object. Sub- // classes should override this to provide more accurate // or possibly more efficient walking. ! void walk_mem_region(MemRegion mr, HeapWord* bottom, HeapWord* top) { ! Filtering_DCTOC::walk_mem_region(mr, bottom, top); ! } public: HeapRegionDCTOC(G1CollectedHeap* g1, HeapRegion* hr, ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, --- 83,99 ---- protected: HeapRegion* _hr; FilterKind _fk; G1CollectedHeap* _g1; // Walk the given memory region from bottom to (actual) top // looking for objects and applying the oop closure (_cl) to // them. The base implementation of this treats the area as // blocks, where a block may or may not be an object. Sub- // classes should override this to provide more accurate // or possibly more efficient walking. ! void walk_mem_region(MemRegion mr, HeapWord* bottom, HeapWord* top); public: HeapRegionDCTOC(G1CollectedHeap* g1, HeapRegion* hr, ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision,