2373 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::object_synchronizer)); |
2373 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::object_synchronizer)); |
2374 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::flat_profiler)); |
2374 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::flat_profiler)); |
2375 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management)); |
2375 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management)); |
2376 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary)); |
2376 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary)); |
2377 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti)); |
2377 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti)); |
2378 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::vm_symbols)); |
|
2379 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache)); |
2378 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache)); |
2380 |
2379 |
2381 if (parallel_gc_threads > 1) { |
2380 if (parallel_gc_threads > 1) { |
2382 for (uint j = 0; j < parallel_gc_threads; j++) { |
2381 for (uint j = 0; j < parallel_gc_threads; j++) { |
2383 q->enqueue(new StealMarkingTask(&terminator)); |
2382 q->enqueue(new StealMarkingTask(&terminator)); |
2423 follow_weak_klass_links(); |
2422 follow_weak_klass_links(); |
2424 |
2423 |
2425 // Revisit memoized MDO's and clear any unmarked weak refs |
2424 // Revisit memoized MDO's and clear any unmarked weak refs |
2426 follow_mdo_weak_refs(); |
2425 follow_mdo_weak_refs(); |
2427 |
2426 |
2428 // Visit symbol and interned string tables and delete unmarked oops |
2427 // Visit interned string tables and delete unmarked oops |
2429 SymbolTable::unlink(is_alive_closure()); |
|
2430 StringTable::unlink(is_alive_closure()); |
2428 StringTable::unlink(is_alive_closure()); |
|
2429 // Clean up unreferenced symbols in symbol table. |
|
2430 SymbolTable::unlink(); |
2431 |
2431 |
2432 assert(cm->marking_stacks_empty(), "marking stacks should be empty"); |
2432 assert(cm->marking_stacks_empty(), "marking stacks should be empty"); |
2433 } |
2433 } |
2434 |
2434 |
2435 // This should be moved to the shared markSweep code! |
2435 // This should be moved to the shared markSweep code! |
2454 FlatProfiler::oops_do(adjust_root_pointer_closure()); |
2454 FlatProfiler::oops_do(adjust_root_pointer_closure()); |
2455 Management::oops_do(adjust_root_pointer_closure()); |
2455 Management::oops_do(adjust_root_pointer_closure()); |
2456 JvmtiExport::oops_do(adjust_root_pointer_closure()); |
2456 JvmtiExport::oops_do(adjust_root_pointer_closure()); |
2457 // SO_AllClasses |
2457 // SO_AllClasses |
2458 SystemDictionary::oops_do(adjust_root_pointer_closure()); |
2458 SystemDictionary::oops_do(adjust_root_pointer_closure()); |
2459 vmSymbols::oops_do(adjust_root_pointer_closure()); |
|
2460 |
2459 |
2461 // Now adjust pointers in remaining weak roots. (All of which should |
2460 // Now adjust pointers in remaining weak roots. (All of which should |
2462 // have been cleared if they pointed to non-surviving objects.) |
2461 // have been cleared if they pointed to non-surviving objects.) |
2463 // Global (weak) JNI handles |
2462 // Global (weak) JNI handles |
2464 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); |
2463 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); |
2465 |
2464 |
2466 CodeCache::oops_do(adjust_pointer_closure()); |
2465 CodeCache::oops_do(adjust_pointer_closure()); |
2467 SymbolTable::oops_do(adjust_root_pointer_closure()); |
|
2468 StringTable::oops_do(adjust_root_pointer_closure()); |
2466 StringTable::oops_do(adjust_root_pointer_closure()); |
2469 ref_processor()->weak_oops_do(adjust_root_pointer_closure()); |
2467 ref_processor()->weak_oops_do(adjust_root_pointer_closure()); |
2470 // Roots were visited so references into the young gen in roots |
2468 // Roots were visited so references into the young gen in roots |
2471 // may have been scanned. Process them also. |
2469 // may have been scanned. Process them also. |
2472 // Should the reference processor have a span that excludes |
2470 // Should the reference processor have a span that excludes |