Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
3764:053d84a76d3d | 3765:ae5b2f1dcf12 |
---|---|
63 ct_freq[j] = 0; | 63 ct_freq[j] = 0; |
64 } | 64 } |
65 | 65 |
66 } | 66 } |
67 #endif | 67 #endif |
68 | |
69 | |
70 class IntoCSOopClosure: public OopsInHeapRegionClosure { | |
71 OopsInHeapRegionClosure* _blk; | |
72 G1CollectedHeap* _g1; | |
73 public: | |
74 IntoCSOopClosure(G1CollectedHeap* g1, OopsInHeapRegionClosure* blk) : | |
75 _g1(g1), _blk(blk) {} | |
76 void set_region(HeapRegion* from) { | |
77 _blk->set_region(from); | |
78 } | |
79 virtual void do_oop(narrowOop* p) { do_oop_work(p); } | |
80 virtual void do_oop( oop* p) { do_oop_work(p); } | |
81 template <class T> void do_oop_work(T* p) { | |
82 oop obj = oopDesc::load_decode_heap_oop(p); | |
83 if (_g1->obj_in_cs(obj)) _blk->do_oop(p); | |
84 } | |
85 bool apply_to_weak_ref_discovered_field() { return true; } | |
86 bool idempotent() { return true; } | |
87 }; | |
88 | |
89 class VerifyRSCleanCardOopClosure: public OopClosure { | |
90 G1CollectedHeap* _g1; | |
91 public: | |
92 VerifyRSCleanCardOopClosure(G1CollectedHeap* g1) : _g1(g1) {} | |
93 | |
94 virtual void do_oop(narrowOop* p) { do_oop_work(p); } | |
95 virtual void do_oop( oop* p) { do_oop_work(p); } | |
96 template <class T> void do_oop_work(T* p) { | |
97 oop obj = oopDesc::load_decode_heap_oop(p); | |
98 HeapRegion* to = _g1->heap_region_containing(obj); | |
99 guarantee(to == NULL || !to->in_collection_set(), | |
100 "Missed a rem set member."); | |
101 } | |
102 }; | |
103 | 68 |
104 G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) | 69 G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) |
105 : _g1(g1), _conc_refine_cards(0), | 70 : _g1(g1), _conc_refine_cards(0), |
106 _ct_bs(ct_bs), _g1p(_g1->g1_policy()), | 71 _ct_bs(ct_bs), _g1p(_g1->g1_policy()), |
107 _cg1r(g1->concurrent_g1_refine()), | 72 _cg1r(g1->concurrent_g1_refine()), |