589 StrongRootsScope srs(this, activate_scope);
590
591 // General roots.
592 assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
593 assert(code_roots != NULL, "code root closure should always be set");
594 // _n_termination for _process_strong_tasks should be set up stream
595 // in a method not running in a GC worker. Otherwise the GC worker
596 // could be trying to change the termination condition while the task
597 // is executing in another GC worker.
598
599 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ClassLoaderDataGraph_oops_do)) {
600 ClassLoaderDataGraph::roots_cld_do(strong_cld_closure, weak_cld_closure);
601 }
602
603 // Some CLDs contained in the thread frames should be considered strong.
604 // Don't process them if they will be processed during the ClassLoaderDataGraph phase.
605 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL;
606 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
607 CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
608
609 Threads::possibly_parallel_oops_do(strong_roots, roots_from_clds_p, roots_from_code_p);
610
611 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
612 Universe::oops_do(strong_roots);
613 }
614 // Global (strong) JNI handles
615 if (!_process_strong_tasks->is_task_claimed(GCH_PS_JNIHandles_oops_do)) {
616 JNIHandles::oops_do(strong_roots);
617 }
618
619 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ObjectSynchronizer_oops_do)) {
620 ObjectSynchronizer::oops_do(strong_roots);
621 }
622 if (!_process_strong_tasks->is_task_claimed(GCH_PS_FlatProfiler_oops_do)) {
623 FlatProfiler::oops_do(strong_roots);
624 }
625 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Management_oops_do)) {
626 Management::oops_do(strong_roots);
627 }
628 if (!_process_strong_tasks->is_task_claimed(GCH_PS_jvmti_oops_do)) {
629 JvmtiExport::oops_do(strong_roots);
|
589 StrongRootsScope srs(this, activate_scope);
590
591 // General roots.
592 assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
593 assert(code_roots != NULL, "code root closure should always be set");
594 // _n_termination for _process_strong_tasks should be set up stream
595 // in a method not running in a GC worker. Otherwise the GC worker
596 // could be trying to change the termination condition while the task
597 // is executing in another GC worker.
598
599 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ClassLoaderDataGraph_oops_do)) {
600 ClassLoaderDataGraph::roots_cld_do(strong_cld_closure, weak_cld_closure);
601 }
602
603 // Some CLDs contained in the thread frames should be considered strong.
604 // Don't process them if they will be processed during the ClassLoaderDataGraph phase.
605 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL;
606 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
607 CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
608
609 bool is_par = n_par_threads() > 0;
610 Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
611
612 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
613 Universe::oops_do(strong_roots);
614 }
615 // Global (strong) JNI handles
616 if (!_process_strong_tasks->is_task_claimed(GCH_PS_JNIHandles_oops_do)) {
617 JNIHandles::oops_do(strong_roots);
618 }
619
620 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ObjectSynchronizer_oops_do)) {
621 ObjectSynchronizer::oops_do(strong_roots);
622 }
623 if (!_process_strong_tasks->is_task_claimed(GCH_PS_FlatProfiler_oops_do)) {
624 FlatProfiler::oops_do(strong_roots);
625 }
626 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Management_oops_do)) {
627 Management::oops_do(strong_roots);
628 }
629 if (!_process_strong_tasks->is_task_claimed(GCH_PS_jvmti_oops_do)) {
630 JvmtiExport::oops_do(strong_roots);
|