Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 3765:ae5b2f1dcf12
7045662: G1: OopsInHeapRegionClosure::set_region() should not be virtual
Summary: make the method non-virtual, remove five unused closures, and fix a couple of copyright typos.
Reviewed-by: stefank, johnc, poonam
author | tonyp |
---|---|
date | Wed, 08 Jun 2011 21:48:38 -0400 |
parents | 063382f9b575 |
children | e8b0b0392037 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp Wed Jun 08 15:31:51 2011 -0400 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp Wed Jun 08 21:48:38 2011 -0400 @@ -66,41 +66,6 @@ } #endif - -class IntoCSOopClosure: public OopsInHeapRegionClosure { - OopsInHeapRegionClosure* _blk; - G1CollectedHeap* _g1; -public: - IntoCSOopClosure(G1CollectedHeap* g1, OopsInHeapRegionClosure* blk) : - _g1(g1), _blk(blk) {} - void set_region(HeapRegion* from) { - _blk->set_region(from); - } - virtual void do_oop(narrowOop* p) { do_oop_work(p); } - virtual void do_oop( oop* p) { do_oop_work(p); } - template <class T> void do_oop_work(T* p) { - oop obj = oopDesc::load_decode_heap_oop(p); - if (_g1->obj_in_cs(obj)) _blk->do_oop(p); - } - bool apply_to_weak_ref_discovered_field() { return true; } - bool idempotent() { return true; } -}; - -class VerifyRSCleanCardOopClosure: public OopClosure { - G1CollectedHeap* _g1; -public: - VerifyRSCleanCardOopClosure(G1CollectedHeap* g1) : _g1(g1) {} - - virtual void do_oop(narrowOop* p) { do_oop_work(p); } - virtual void do_oop( oop* p) { do_oop_work(p); } - template <class T> void do_oop_work(T* p) { - oop obj = oopDesc::load_decode_heap_oop(p); - HeapRegion* to = _g1->heap_region_containing(obj); - guarantee(to == NULL || !to->in_collection_set(), - "Missed a rem set member."); - } -}; - G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) : _g1(g1), _conc_refine_cards(0), _ct_bs(ct_bs), _g1p(_g1->g1_policy()),