Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @ 20278:2c6ef90f030a
8049421: G1 Class Unloading after completing a concurrent mark cycle
Reviewed-by: tschatzl, ehelin, brutisso, coleenp, roland, iveresov
Contributed-by: stefan.karlsson@oracle.com, mikael.gerdin@oracle.com
author | stefank |
---|---|
date | Mon, 07 Jul 2014 10:12:40 +0200 |
parents | 0982ec23da03 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20277:882004b9e7e1 | 20278:2c6ef90f030a |
---|---|
526 { | 526 { |
527 ParallelScavengeHeap::ParStrongRootsScope psrs; | 527 ParallelScavengeHeap::ParStrongRootsScope psrs; |
528 Universe::oops_do(mark_and_push_closure()); | 528 Universe::oops_do(mark_and_push_closure()); |
529 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles | 529 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles |
530 CLDToOopClosure mark_and_push_from_cld(mark_and_push_closure()); | 530 CLDToOopClosure mark_and_push_from_cld(mark_and_push_closure()); |
531 CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true); | 531 MarkingCodeBlobClosure each_active_code_blob(mark_and_push_closure(), !CodeBlobToOopClosure::FixRelocations); |
532 Threads::oops_do(mark_and_push_closure(), &mark_and_push_from_cld, &each_active_code_blob); | 532 Threads::oops_do(mark_and_push_closure(), &mark_and_push_from_cld, &each_active_code_blob); |
533 ObjectSynchronizer::oops_do(mark_and_push_closure()); | 533 ObjectSynchronizer::oops_do(mark_and_push_closure()); |
534 FlatProfiler::oops_do(mark_and_push_closure()); | 534 FlatProfiler::oops_do(mark_and_push_closure()); |
535 Management::oops_do(mark_and_push_closure()); | 535 Management::oops_do(mark_and_push_closure()); |
536 JvmtiExport::oops_do(mark_and_push_closure()); | 536 JvmtiExport::oops_do(mark_and_push_closure()); |
537 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); | 537 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); |
538 ClassLoaderDataGraph::always_strong_oops_do(mark_and_push_closure(), follow_klass_closure(), true); | 538 ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure()); |
539 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. | 539 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. |
540 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); | 540 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); |
541 } | 541 } |
542 | 542 |
543 // Flush marking stack. | 543 // Flush marking stack. |
623 Threads::oops_do(adjust_pointer_closure(), &adjust_from_cld, NULL); | 623 Threads::oops_do(adjust_pointer_closure(), &adjust_from_cld, NULL); |
624 ObjectSynchronizer::oops_do(adjust_pointer_closure()); | 624 ObjectSynchronizer::oops_do(adjust_pointer_closure()); |
625 FlatProfiler::oops_do(adjust_pointer_closure()); | 625 FlatProfiler::oops_do(adjust_pointer_closure()); |
626 Management::oops_do(adjust_pointer_closure()); | 626 Management::oops_do(adjust_pointer_closure()); |
627 JvmtiExport::oops_do(adjust_pointer_closure()); | 627 JvmtiExport::oops_do(adjust_pointer_closure()); |
628 // SO_AllClasses | |
629 SystemDictionary::oops_do(adjust_pointer_closure()); | 628 SystemDictionary::oops_do(adjust_pointer_closure()); |
630 ClassLoaderDataGraph::oops_do(adjust_pointer_closure(), adjust_klass_closure(), true); | 629 ClassLoaderDataGraph::cld_do(adjust_cld_closure()); |
631 | 630 |
632 // Now adjust pointers in remaining weak roots. (All of which should | 631 // Now adjust pointers in remaining weak roots. (All of which should |
633 // have been cleared if they pointed to non-surviving objects.) | 632 // have been cleared if they pointed to non-surviving objects.) |
634 // Global (weak) JNI handles | 633 // Global (weak) JNI handles |
635 JNIHandles::weak_oops_do(&always_true, adjust_pointer_closure()); | 634 JNIHandles::weak_oops_do(&always_true, adjust_pointer_closure()); |
636 | 635 |
637 CodeCache::oops_do(adjust_pointer_closure()); | 636 CodeBlobToOopClosure adjust_from_blobs(adjust_pointer_closure(), CodeBlobToOopClosure::FixRelocations); |
637 CodeCache::blobs_do(&adjust_from_blobs); | |
638 StringTable::oops_do(adjust_pointer_closure()); | 638 StringTable::oops_do(adjust_pointer_closure()); |
639 ref_processor()->weak_oops_do(adjust_pointer_closure()); | 639 ref_processor()->weak_oops_do(adjust_pointer_closure()); |
640 PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure()); | 640 PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure()); |
641 | 641 |
642 adjust_marks(); | 642 adjust_marks(); |