2426 bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
2427
2428 // Follow code cache roots.
2429 CodeCache::do_unloading(is_alive_closure(), &mark_and_push_closure,
2430 purged_class);
2431 cm->follow_marking_stacks(); // Flush marking stack.
2432
2433 // Update subklass/sibling/implementor links of live klasses
2434 // revisit_klass_stack is used in follow_weak_klass_links().
2435 follow_weak_klass_links();
2436
2437 // Revisit memoized MDO's and clear any unmarked weak refs
2438 follow_mdo_weak_refs();
2439
2440 // Visit interned string tables and delete unmarked oops
2441 StringTable::unlink(is_alive_closure());
2442 // Clean up unreferenced symbols in symbol table.
2443 SymbolTable::unlink();
2444
2445 assert(cm->marking_stacks_empty(), "marking stacks should be empty");
2446 }
2447
2448 // This should be moved to the shared markSweep code!
2449 class PSAlwaysTrueClosure: public BoolObjectClosure {
2450 public:
2451 void do_object(oop p) { ShouldNotReachHere(); }
2452 bool do_object_b(oop p) { return true; }
2453 };
2454 static PSAlwaysTrueClosure always_true;
2455
2456 void PSParallelCompact::adjust_roots() {
2457 // Adjust the pointers to reflect the new locations
2458 GCTraceTime tm("adjust roots", print_phases(), true, &_gc_timer);
2459
2460 // General strong roots.
2461 Universe::oops_do(adjust_root_pointer_closure());
2462 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles
2463 Threads::oops_do(adjust_root_pointer_closure(), NULL);
2464 ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
2465 FlatProfiler::oops_do(adjust_root_pointer_closure());
|
2426 bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
2427
2428 // Follow code cache roots.
2429 CodeCache::do_unloading(is_alive_closure(), &mark_and_push_closure,
2430 purged_class);
2431 cm->follow_marking_stacks(); // Flush marking stack.
2432
2433 // Update subklass/sibling/implementor links of live klasses
2434 // revisit_klass_stack is used in follow_weak_klass_links().
2435 follow_weak_klass_links();
2436
2437 // Revisit memoized MDO's and clear any unmarked weak refs
2438 follow_mdo_weak_refs();
2439
2440 // Visit interned string tables and delete unmarked oops
2441 StringTable::unlink(is_alive_closure());
2442 // Clean up unreferenced symbols in symbol table.
2443 SymbolTable::unlink();
2444
2445 assert(cm->marking_stacks_empty(), "marking stacks should be empty");
2446 _gc_tracer.report_object_count_after_gc(is_alive_closure());
2447 }
2448
2449 // This should be moved to the shared markSweep code!
2450 class PSAlwaysTrueClosure: public BoolObjectClosure {
2451 public:
2452 void do_object(oop p) { ShouldNotReachHere(); }
2453 bool do_object_b(oop p) { return true; }
2454 };
2455 static PSAlwaysTrueClosure always_true;
2456
2457 void PSParallelCompact::adjust_roots() {
2458 // Adjust the pointers to reflect the new locations
2459 GCTraceTime tm("adjust roots", print_phases(), true, &_gc_timer);
2460
2461 // General strong roots.
2462 Universe::oops_do(adjust_root_pointer_closure());
2463 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles
2464 Threads::oops_do(adjust_root_pointer_closure(), NULL);
2465 ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
2466 FlatProfiler::oops_do(adjust_root_pointer_closure());
|