Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | 9afee0b9fc1d |
children | 92da084fefc9 |
comparison
equal
deleted
inserted
replaced
2176:27e4ea99855d | 2177:3582bf76420e |
---|---|
525 ObjectSynchronizer::oops_do(mark_and_push_closure()); | 525 ObjectSynchronizer::oops_do(mark_and_push_closure()); |
526 FlatProfiler::oops_do(mark_and_push_closure()); | 526 FlatProfiler::oops_do(mark_and_push_closure()); |
527 Management::oops_do(mark_and_push_closure()); | 527 Management::oops_do(mark_and_push_closure()); |
528 JvmtiExport::oops_do(mark_and_push_closure()); | 528 JvmtiExport::oops_do(mark_and_push_closure()); |
529 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); | 529 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); |
530 vmSymbols::oops_do(mark_and_push_closure()); | |
531 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. | 530 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. |
532 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); | 531 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); |
533 } | 532 } |
534 | 533 |
535 // Flush marking stack. | 534 // Flush marking stack. |
556 | 555 |
557 // Visit memoized mdo's and clear unmarked weak refs | 556 // Visit memoized mdo's and clear unmarked weak refs |
558 follow_mdo_weak_refs(); | 557 follow_mdo_weak_refs(); |
559 assert(_marking_stack.is_empty(), "just drained"); | 558 assert(_marking_stack.is_empty(), "just drained"); |
560 | 559 |
561 // Visit symbol and interned string tables and delete unmarked oops | 560 // Visit interned string tables and delete unmarked oops |
562 SymbolTable::unlink(is_alive_closure()); | |
563 StringTable::unlink(is_alive_closure()); | 561 StringTable::unlink(is_alive_closure()); |
562 // Clean up unreferenced symbols in symbol table. | |
563 SymbolTable::unlink(); | |
564 | 564 |
565 assert(_marking_stack.is_empty(), "stack should be empty by now"); | 565 assert(_marking_stack.is_empty(), "stack should be empty by now"); |
566 } | 566 } |
567 | 567 |
568 | 568 |
632 FlatProfiler::oops_do(adjust_root_pointer_closure()); | 632 FlatProfiler::oops_do(adjust_root_pointer_closure()); |
633 Management::oops_do(adjust_root_pointer_closure()); | 633 Management::oops_do(adjust_root_pointer_closure()); |
634 JvmtiExport::oops_do(adjust_root_pointer_closure()); | 634 JvmtiExport::oops_do(adjust_root_pointer_closure()); |
635 // SO_AllClasses | 635 // SO_AllClasses |
636 SystemDictionary::oops_do(adjust_root_pointer_closure()); | 636 SystemDictionary::oops_do(adjust_root_pointer_closure()); |
637 vmSymbols::oops_do(adjust_root_pointer_closure()); | |
638 //CodeCache::scavenge_root_nmethods_oops_do(adjust_root_pointer_closure()); | 637 //CodeCache::scavenge_root_nmethods_oops_do(adjust_root_pointer_closure()); |
639 | 638 |
640 // Now adjust pointers in remaining weak roots. (All of which should | 639 // Now adjust pointers in remaining weak roots. (All of which should |
641 // have been cleared if they pointed to non-surviving objects.) | 640 // have been cleared if they pointed to non-surviving objects.) |
642 // Global (weak) JNI handles | 641 // Global (weak) JNI handles |
643 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); | 642 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); |
644 | 643 |
645 CodeCache::oops_do(adjust_pointer_closure()); | 644 CodeCache::oops_do(adjust_pointer_closure()); |
646 SymbolTable::oops_do(adjust_root_pointer_closure()); | |
647 StringTable::oops_do(adjust_root_pointer_closure()); | 645 StringTable::oops_do(adjust_root_pointer_closure()); |
648 ref_processor()->weak_oops_do(adjust_root_pointer_closure()); | 646 ref_processor()->weak_oops_do(adjust_root_pointer_closure()); |
649 PSScavenge::reference_processor()->weak_oops_do(adjust_root_pointer_closure()); | 647 PSScavenge::reference_processor()->weak_oops_do(adjust_root_pointer_closure()); |
650 | 648 |
651 adjust_marks(); | 649 adjust_marks(); |