Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 626:87fa6e083d82
6760309: G1: update remembered sets during Full GCs
Reviewed-by: iveresov, tonyp
author | apetrusenko |
---|---|
date | Tue, 10 Mar 2009 00:47:05 -0700 |
parents | 4f360ec815ba |
children | 7bb995fbd3c0 25e146966e7c |
comparison
equal
deleted
inserted
replaced
620:bcedf688d882 | 626:87fa6e083d82 |
---|---|
102 StupidG1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, | 102 StupidG1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, |
103 int worker_i) { | 103 int worker_i) { |
104 IntoCSRegionClosure rc(_g1, oc); | 104 IntoCSRegionClosure rc(_g1, oc); |
105 _g1->heap_region_iterate(&rc); | 105 _g1->heap_region_iterate(&rc); |
106 } | 106 } |
107 | |
108 class UpdateRSOopClosure: public OopClosure { | |
109 HeapRegion* _from; | |
110 HRInto_G1RemSet* _rs; | |
111 int _worker_i; | |
112 public: | |
113 UpdateRSOopClosure(HRInto_G1RemSet* rs, int worker_i = 0) : | |
114 _from(NULL), _rs(rs), _worker_i(worker_i) { | |
115 guarantee(_rs != NULL, "Requires an HRIntoG1RemSet"); | |
116 } | |
117 | |
118 void set_from(HeapRegion* from) { | |
119 assert(from != NULL, "from region must be non-NULL"); | |
120 _from = from; | |
121 } | |
122 | |
123 virtual void do_oop(narrowOop* p) { | |
124 guarantee(false, "NYI"); | |
125 } | |
126 virtual void do_oop(oop* p) { | |
127 assert(_from != NULL, "from region must be non-NULL"); | |
128 _rs->par_write_ref(_from, p, _worker_i); | |
129 } | |
130 // Override: this closure is idempotent. | |
131 // bool idempotent() { return true; } | |
132 bool apply_to_weak_ref_discovered_field() { return true; } | |
133 }; | |
134 | 107 |
135 class UpdateRSOutOfRegionClosure: public HeapRegionClosure { | 108 class UpdateRSOutOfRegionClosure: public HeapRegionClosure { |
136 G1CollectedHeap* _g1h; | 109 G1CollectedHeap* _g1h; |
137 ModRefBarrierSet* _mr_bs; | 110 ModRefBarrierSet* _mr_bs; |
138 UpdateRSOopClosure _cl; | 111 UpdateRSOopClosure _cl; |