607 if (!_process_strong_tasks->is_task_claimed(GCH_PS_SystemDictionary_oops_do)) {
608 SystemDictionary::roots_oops_do(strong_roots, weak_roots);
609 }
610
611 // All threads execute the following. A specific chunk of buckets
612 // from the StringTable are the individual tasks.
613 if (weak_roots != NULL) {
614 if (is_par) {
615 StringTable::possibly_parallel_oops_do(weak_roots);
616 } else {
617 StringTable::oops_do(weak_roots);
618 }
619 }
620
621 if (!_process_strong_tasks->is_task_claimed(GCH_PS_CodeCache_oops_do)) {
622 if (so & SO_ScavengeCodeCache) {
623 assert(code_roots != NULL, "must supply closure for code cache");
624
625 // We only visit parts of the CodeCache when scavenging.
626 CodeCache::scavenge_root_nmethods_do(code_roots);
627 }
628 if (so & SO_AllCodeCache) {
629 assert(code_roots != NULL, "must supply closure for code cache");
630
631 // CMSCollector uses this to do intermediate-strength collections.
632 // We scan the entire code cache, since CodeCache::do_unloading is not called.
633 CodeCache::blobs_do(code_roots);
634 }
635 // Verify that the code cache contents are not subject to
636 // movement by a scavenging collection.
637 DEBUG_ONLY(CodeBlobToOopClosure assert_code_is_non_scavengable(&assert_is_non_scavengable_closure, !CodeBlobToOopClosure::FixRelocations));
638 DEBUG_ONLY(CodeCache::asserted_non_scavengable_nmethods_do(&assert_code_is_non_scavengable));
639 }
640 }
641
642 void GenCollectedHeap::gen_process_roots(StrongRootsScope* scope,
643 GenerationType type,
644 bool young_gen_as_roots,
645 ScanningOption so,
646 bool only_strong_roots,
|
607 if (!_process_strong_tasks->is_task_claimed(GCH_PS_SystemDictionary_oops_do)) {
608 SystemDictionary::roots_oops_do(strong_roots, weak_roots);
609 }
610
611 // All threads execute the following. A specific chunk of buckets
612 // from the StringTable are the individual tasks.
613 if (weak_roots != NULL) {
614 if (is_par) {
615 StringTable::possibly_parallel_oops_do(weak_roots);
616 } else {
617 StringTable::oops_do(weak_roots);
618 }
619 }
620
621 if (!_process_strong_tasks->is_task_claimed(GCH_PS_CodeCache_oops_do)) {
622 if (so & SO_ScavengeCodeCache) {
623 assert(code_roots != NULL, "must supply closure for code cache");
624
625 // We only visit parts of the CodeCache when scavenging.
626 CodeCache::scavenge_root_nmethods_do(code_roots);
627 CodeCache::prune_scavenge_root_nmethods();
628 }
629 if (so & SO_AllCodeCache) {
630 assert(code_roots != NULL, "must supply closure for code cache");
631
632 // CMSCollector uses this to do intermediate-strength collections.
633 // We scan the entire code cache, since CodeCache::do_unloading is not called.
634 CodeCache::blobs_do(code_roots);
635 }
636 // Verify that the code cache contents are not subject to
637 // movement by a scavenging collection.
638 DEBUG_ONLY(CodeBlobToOopClosure assert_code_is_non_scavengable(&assert_is_non_scavengable_closure, !CodeBlobToOopClosure::FixRelocations));
639 DEBUG_ONLY(CodeCache::asserted_non_scavengable_nmethods_do(&assert_code_is_non_scavengable));
640 }
641 }
642
643 void GenCollectedHeap::gen_process_roots(StrongRootsScope* scope,
644 GenerationType type,
645 bool young_gen_as_roots,
646 ScanningOption so,
647 bool only_strong_roots,
|