< prev index next >

src/share/vm/gc/shenandoah/shenandoahRootProcessor.cpp

Print this page
rev 13333 : [mq]: tl-syncroots.patch


 130     Management::oops_do(strong_roots);
 131   }
 132   if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_jvmti_oops_do)) {
 133     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::JVMTIRoots, worker_id);
 134     JvmtiExport::oops_do(strong_roots);
 135   }
 136   if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_SystemDictionary_oops_do)) {
 137     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::SystemDictionaryRoots, worker_id);
 138     SystemDictionary::roots_oops_do(strong_roots, weak_roots);
 139   }
 140   if (jni_weak_roots != NULL) {
 141     if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_JNIHandles_weak_oops_do)) {
 142       ShenandoahAlwaysTrueClosure always_true;
 143       ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::JNIWeakRoots, worker_id);
 144       JNIHandles::weak_oops_do(&always_true, jni_weak_roots);
 145     }
 146   }
 147 
 148   {
 149     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::ObjectSynchronizerRoots, worker_id);



 150     while(_om_iterator.parallel_oops_do(strong_roots));

 151   }
 152 
 153   // All threads execute the following. A specific chunk of buckets
 154   // from the StringTable are the individual tasks.
 155   if (weak_roots != NULL) {
 156     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::StringTableRoots, worker_id);
 157     StringTable::possibly_parallel_oops_do(weak_roots);
 158   }
 159 }
 160 
 161 uint ShenandoahRootProcessor::n_workers() const {
 162   return _srs.n_threads();
 163 }
 164 
 165 ShenandoahRootEvacuator::ShenandoahRootEvacuator(ShenandoahHeap* heap, uint n_workers, ShenandoahCollectorPolicy::TimingPhase phase) :
 166   _process_strong_tasks(new SubTasksDone(SHENANDOAH_RP_PS_NumElements)),
 167   _srs(n_workers),
 168   _phase(phase),
 169   _codecache_iterator(CodeCache::parallel_iterator())
 170 {




 130     Management::oops_do(strong_roots);
 131   }
 132   if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_jvmti_oops_do)) {
 133     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::JVMTIRoots, worker_id);
 134     JvmtiExport::oops_do(strong_roots);
 135   }
 136   if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_SystemDictionary_oops_do)) {
 137     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::SystemDictionaryRoots, worker_id);
 138     SystemDictionary::roots_oops_do(strong_roots, weak_roots);
 139   }
 140   if (jni_weak_roots != NULL) {
 141     if (!_process_strong_tasks->is_task_claimed(SHENANDOAH_RP_PS_JNIHandles_weak_oops_do)) {
 142       ShenandoahAlwaysTrueClosure always_true;
 143       ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::JNIWeakRoots, worker_id);
 144       JNIHandles::weak_oops_do(&always_true, jni_weak_roots);
 145     }
 146   }
 147 
 148   {
 149     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::ObjectSynchronizerRoots, worker_id);
 150     if (ShenandoahFastSyncRoots && MonitorInUseLists) {
 151       ObjectSynchronizer::global_used_oops_do(strong_roots);
 152     } else {
 153       while(_om_iterator.parallel_oops_do(strong_roots));
 154     }
 155   }
 156 
 157   // All threads execute the following. A specific chunk of buckets
 158   // from the StringTable are the individual tasks.
 159   if (weak_roots != NULL) {
 160     ShenandoahParPhaseTimesTracker timer(phase_times, ShenandoahPhaseTimes::StringTableRoots, worker_id);
 161     StringTable::possibly_parallel_oops_do(weak_roots);
 162   }
 163 }
 164 
 165 uint ShenandoahRootProcessor::n_workers() const {
 166   return _srs.n_threads();
 167 }
 168 
 169 ShenandoahRootEvacuator::ShenandoahRootEvacuator(ShenandoahHeap* heap, uint n_workers, ShenandoahCollectorPolicy::TimingPhase phase) :
 170   _process_strong_tasks(new SubTasksDone(SHENANDOAH_RP_PS_NumElements)),
 171   _srs(n_workers),
 172   _phase(phase),
 173   _codecache_iterator(CodeCache::parallel_iterator())
 174 {


< prev index next >