Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @ 1000:a1423fe86a18
Merge
author | trims |
---|---|
date | Fri, 09 Oct 2009 15:18:52 -0700 |
parents | 54b3b351d6f9 |
children | 2a1472c30599 |
comparison
equal
deleted
inserted
replaced
984:6ddec5389232 | 1000:a1423fe86a18 |
---|---|
509 | 509 |
510 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); | 510 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); |
511 assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity"); | 511 assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity"); |
512 | 512 |
513 // General strong roots. | 513 // General strong roots. |
514 Universe::oops_do(mark_and_push_closure()); | 514 { |
515 ReferenceProcessor::oops_do(mark_and_push_closure()); | 515 ParallelScavengeHeap::ParStrongRootsScope psrs; |
516 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles | 516 Universe::oops_do(mark_and_push_closure()); |
517 Threads::oops_do(mark_and_push_closure()); | 517 ReferenceProcessor::oops_do(mark_and_push_closure()); |
518 ObjectSynchronizer::oops_do(mark_and_push_closure()); | 518 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles |
519 FlatProfiler::oops_do(mark_and_push_closure()); | 519 CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true); |
520 Management::oops_do(mark_and_push_closure()); | 520 Threads::oops_do(mark_and_push_closure(), &each_active_code_blob); |
521 JvmtiExport::oops_do(mark_and_push_closure()); | 521 ObjectSynchronizer::oops_do(mark_and_push_closure()); |
522 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); | 522 FlatProfiler::oops_do(mark_and_push_closure()); |
523 vmSymbols::oops_do(mark_and_push_closure()); | 523 Management::oops_do(mark_and_push_closure()); |
524 JvmtiExport::oops_do(mark_and_push_closure()); | |
525 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); | |
526 vmSymbols::oops_do(mark_and_push_closure()); | |
527 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. | |
528 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); | |
529 } | |
524 | 530 |
525 // Flush marking stack. | 531 // Flush marking stack. |
526 follow_stack(); | 532 follow_stack(); |
527 | 533 |
528 // Process reference objects found during marking | 534 // Process reference objects found during marking |
615 | 621 |
616 // General strong roots. | 622 // General strong roots. |
617 Universe::oops_do(adjust_root_pointer_closure()); | 623 Universe::oops_do(adjust_root_pointer_closure()); |
618 ReferenceProcessor::oops_do(adjust_root_pointer_closure()); | 624 ReferenceProcessor::oops_do(adjust_root_pointer_closure()); |
619 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles | 625 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles |
620 Threads::oops_do(adjust_root_pointer_closure()); | 626 Threads::oops_do(adjust_root_pointer_closure(), NULL); |
621 ObjectSynchronizer::oops_do(adjust_root_pointer_closure()); | 627 ObjectSynchronizer::oops_do(adjust_root_pointer_closure()); |
622 FlatProfiler::oops_do(adjust_root_pointer_closure()); | 628 FlatProfiler::oops_do(adjust_root_pointer_closure()); |
623 Management::oops_do(adjust_root_pointer_closure()); | 629 Management::oops_do(adjust_root_pointer_closure()); |
624 JvmtiExport::oops_do(adjust_root_pointer_closure()); | 630 JvmtiExport::oops_do(adjust_root_pointer_closure()); |
625 // SO_AllClasses | 631 // SO_AllClasses |
626 SystemDictionary::oops_do(adjust_root_pointer_closure()); | 632 SystemDictionary::oops_do(adjust_root_pointer_closure()); |
627 vmSymbols::oops_do(adjust_root_pointer_closure()); | 633 vmSymbols::oops_do(adjust_root_pointer_closure()); |
634 //CodeCache::scavenge_root_nmethods_oops_do(adjust_root_pointer_closure()); | |
628 | 635 |
629 // Now adjust pointers in remaining weak roots. (All of which should | 636 // Now adjust pointers in remaining weak roots. (All of which should |
630 // have been cleared if they pointed to non-surviving objects.) | 637 // have been cleared if they pointed to non-surviving objects.) |
631 // Global (weak) JNI handles | 638 // Global (weak) JNI handles |
632 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); | 639 JNIHandles::weak_oops_do(&always_true, adjust_root_pointer_closure()); |