comparison src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.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 b06ac540229e
children 4868caa99ecf
comparison
equal deleted inserted replaced
10187:b294421fa3c5 10188:2f50bc369470
2352 is_alive_closure(), &mark_and_push_closure, &follow_stack_closure, NULL); 2352 is_alive_closure(), &mark_and_push_closure, &follow_stack_closure, NULL);
2353 } 2353 }
2354 } 2354 }
2355 2355
2356 TraceTime tm_c("class unloading", print_phases(), true, gclog_or_tty); 2356 TraceTime tm_c("class unloading", print_phases(), true, gclog_or_tty);
2357
2358 // This is the point where the entire marking should have completed.
2359 assert(cm->marking_stacks_empty(), "Marking should have completed");
2360
2357 // Follow system dictionary roots and unload classes. 2361 // Follow system dictionary roots and unload classes.
2358 bool purged_class = SystemDictionary::do_unloading(is_alive_closure()); 2362 bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
2359 2363
2360 // Follow code cache roots. 2364 // Unload nmethods.
2361 CodeCache::do_unloading(is_alive_closure(), purged_class); 2365 CodeCache::do_unloading(is_alive_closure(), purged_class);
2362 cm->follow_marking_stacks(); // Flush marking stack. 2366
2363 2367 // Prune dead klasses from subklass/sibling/implementor lists.
2364 // Update subklass/sibling/implementor links of live klasses
2365 Klass::clean_weak_klass_links(is_alive_closure()); 2368 Klass::clean_weak_klass_links(is_alive_closure());
2366 2369
2367 // Visit interned string tables and delete unmarked oops 2370 // Delete entries for dead interned strings.
2368 StringTable::unlink(is_alive_closure()); 2371 StringTable::unlink(is_alive_closure());
2372
2369 // Clean up unreferenced symbols in symbol table. 2373 // Clean up unreferenced symbols in symbol table.
2370 SymbolTable::unlink(); 2374 SymbolTable::unlink();
2371
2372 assert(cm->marking_stacks_empty(), "marking stacks should be empty");
2373 } 2375 }
2374 2376
2375 void PSParallelCompact::follow_klass(ParCompactionManager* cm, Klass* klass) { 2377 void PSParallelCompact::follow_klass(ParCompactionManager* cm, Klass* klass) {
2376 ClassLoaderData* cld = klass->class_loader_data(); 2378 ClassLoaderData* cld = klass->class_loader_data();
2377 // The actual processing of the klass is done when we 2379 // The actual processing of the klass is done when we