Mercurial > hg > graal-compiler
comparison src/share/vm/memory/genMarkSweep.cpp @ 993:54b3b351d6f9
Merge
author | jrose |
---|---|
date | Wed, 23 Sep 2009 23:56:15 -0700 |
parents | 148e5441d916 8b46c4d82093 |
children | a1423fe86a18 |
comparison
equal
deleted
inserted
replaced
992:6a8ccac44f41 | 993:54b3b351d6f9 |
---|---|
160 | 160 |
161 _marking_stack = new (ResourceObj::C_HEAP) GrowableArray<oop>(4000, true); | 161 _marking_stack = new (ResourceObj::C_HEAP) GrowableArray<oop>(4000, true); |
162 | 162 |
163 int size = SystemDictionary::number_of_classes() * 2; | 163 int size = SystemDictionary::number_of_classes() * 2; |
164 _revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray<Klass*>(size, true); | 164 _revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray<Klass*>(size, true); |
165 // (#klass/k)^2 for k ~ 10 appears to be a better fit, but this will have to do for | |
166 // now until we have had a chance to investigate a more optimal setting. | |
167 _revisit_mdo_stack = new (ResourceObj::C_HEAP) GrowableArray<DataLayout*>(2*size, true); | |
165 | 168 |
166 #ifdef VALIDATE_MARK_SWEEP | 169 #ifdef VALIDATE_MARK_SWEEP |
167 if (ValidateMarkSweep) { | 170 if (ValidateMarkSweep) { |
168 _root_refs_stack = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true); | 171 _root_refs_stack = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true); |
169 _other_refs_stack = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true); | 172 _other_refs_stack = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true); |
204 _preserved_oop_stack = NULL; | 207 _preserved_oop_stack = NULL; |
205 } | 208 } |
206 | 209 |
207 delete _marking_stack; | 210 delete _marking_stack; |
208 delete _revisit_klass_stack; | 211 delete _revisit_klass_stack; |
212 delete _revisit_mdo_stack; | |
209 | 213 |
210 #ifdef VALIDATE_MARK_SWEEP | 214 #ifdef VALIDATE_MARK_SWEEP |
211 if (ValidateMarkSweep) { | 215 if (ValidateMarkSweep) { |
212 delete _root_refs_stack; | 216 delete _root_refs_stack; |
213 delete _other_refs_stack; | 217 delete _other_refs_stack; |
263 | 267 |
264 // Update subklass/sibling/implementor links of live klasses | 268 // Update subklass/sibling/implementor links of live klasses |
265 follow_weak_klass_links(); | 269 follow_weak_klass_links(); |
266 assert(_marking_stack->is_empty(), "just drained"); | 270 assert(_marking_stack->is_empty(), "just drained"); |
267 | 271 |
272 // Visit memoized MDO's and clear any unmarked weak refs | |
273 follow_mdo_weak_refs(); | |
274 assert(_marking_stack->is_empty(), "just drained"); | |
275 | |
268 // Visit symbol and interned string tables and delete unmarked oops | 276 // Visit symbol and interned string tables and delete unmarked oops |
269 SymbolTable::unlink(&is_alive); | 277 SymbolTable::unlink(&is_alive); |
270 StringTable::unlink(&is_alive); | 278 StringTable::unlink(&is_alive); |
271 | 279 |
272 assert(_marking_stack->is_empty(), "stack should be empty by now"); | 280 assert(_marking_stack->is_empty(), "stack should be empty by now"); |