105 void ThreadRootsTask::do_it(GCTaskManager* manager, uint which) { |
113 void ThreadRootsTask::do_it(GCTaskManager* manager, uint which) { |
106 assert(Universe::heap()->is_gc_active(), "called outside gc"); |
114 assert(Universe::heap()->is_gc_active(), "called outside gc"); |
107 |
115 |
108 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which); |
116 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which); |
109 PSScavengeRootsClosure roots_closure(pm); |
117 PSScavengeRootsClosure roots_closure(pm); |
|
118 CodeBlobToOopClosure roots_in_blobs(&roots_closure, /*do_marking=*/ true); |
110 |
119 |
111 if (_java_thread != NULL) |
120 if (_java_thread != NULL) |
112 _java_thread->oops_do(&roots_closure); |
121 _java_thread->oops_do(&roots_closure, &roots_in_blobs); |
113 |
122 |
114 if (_vm_thread != NULL) |
123 if (_vm_thread != NULL) |
115 _vm_thread->oops_do(&roots_closure); |
124 _vm_thread->oops_do(&roots_closure, &roots_in_blobs); |
116 |
125 |
117 // Do the real work |
126 // Do the real work |
118 pm->drain_stacks(false); |
127 pm->drain_stacks(false); |
119 } |
128 } |
120 |
129 |