Currently, the OopsInHeapRegionClosure::set_region() is virtual: class OopsInHeapRegionClosure: public OopsInGenClosure { protected: HeapRegion* _from; public: virtual void set_region(HeapRegion* from) { _from = from; } }; This seems to be so that two subclasses, FilterInHeapRegionAndIntoCSClosure and FilterAndMarkInHeapRegionAndIntoCSClosure, can overwrite it. It turns out that these two subclasses are not used. So, we should remove them and make set_region() non-virtual. set_region() is used a fair amount during evacuation pauses so this might have a performance benefit.
|