Mercurial > hg > truffle
comparison src/share/vm/memory/genMarkSweep.cpp @ 10188:2f50bc369470
8013160: NPG: Remove unnecessary mark stack draining after CodeCache::do_unloading
Reviewed-by: coleenp, mgerdin
author | stefank |
---|---|
date | Fri, 26 Apr 2013 10:40:36 +0200 |
parents | a08c80e9e1e5 |
children | f2110083203d |
comparison
equal
deleted
inserted
replaced
10187:b294421fa3c5 | 10188:2f50bc369470 |
---|---|
221 ref_processor()->setup_policy(clear_all_softrefs); | 221 ref_processor()->setup_policy(clear_all_softrefs); |
222 ref_processor()->process_discovered_references( | 222 ref_processor()->process_discovered_references( |
223 &is_alive, &keep_alive, &follow_stack_closure, NULL); | 223 &is_alive, &keep_alive, &follow_stack_closure, NULL); |
224 } | 224 } |
225 | 225 |
226 // Follow system dictionary roots and unload classes | 226 // This is the point where the entire marking should have completed. |
227 assert(_marking_stack.is_empty(), "Marking should have completed"); | |
228 | |
229 // Unload classes and purge the SystemDictionary. | |
227 bool purged_class = SystemDictionary::do_unloading(&is_alive); | 230 bool purged_class = SystemDictionary::do_unloading(&is_alive); |
228 | 231 |
229 // Follow code cache roots | 232 // Unload nmethods. |
230 CodeCache::do_unloading(&is_alive, purged_class); | 233 CodeCache::do_unloading(&is_alive, purged_class); |
231 follow_stack(); // Flush marking stack | 234 |
232 | 235 // Prune dead klasses from subklass/sibling/implementor lists. |
233 // Update subklass/sibling/implementor links of live klasses | |
234 Klass::clean_weak_klass_links(&is_alive); | 236 Klass::clean_weak_klass_links(&is_alive); |
235 assert(_marking_stack.is_empty(), "just drained"); | 237 |
236 | 238 // Delete entries for dead interned strings. |
237 // Visit interned string tables and delete unmarked oops | |
238 StringTable::unlink(&is_alive); | 239 StringTable::unlink(&is_alive); |
240 | |
239 // Clean up unreferenced symbols in symbol table. | 241 // Clean up unreferenced symbols in symbol table. |
240 SymbolTable::unlink(); | 242 SymbolTable::unlink(); |
241 | |
242 assert(_marking_stack.is_empty(), "stack should be empty by now"); | |
243 } | 243 } |
244 | 244 |
245 | 245 |
246 void GenMarkSweep::mark_sweep_phase2() { | 246 void GenMarkSweep::mark_sweep_phase2() { |
247 // Now all live objects are marked, compute the new object addresses. | 247 // Now all live objects are marked, compute the new object addresses. |