< prev index next >

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

Print this page
rev 55477 : 8226310: Shenandoah: Concurrent evacuation of CLDG


 145 ShenandoahRootProcessor::ShenandoahRootProcessor(ShenandoahPhaseTimings::Phase phase) :
 146   _heap(ShenandoahHeap::heap()),
 147   _phase(phase) {
 148   assert(SafepointSynchronize::is_at_safepoint(), "Must at safepoint");
 149   _heap->phase_timings()->record_workers_start(_phase);
 150 }
 151 
 152 ShenandoahRootProcessor::~ShenandoahRootProcessor() {
 153   assert(SafepointSynchronize::is_at_safepoint(), "Must at safepoint");
 154   _heap->phase_timings()->record_workers_end(_phase);
 155 }
 156 
 157 ShenandoahRootEvacuator::ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool include_concurrent_roots) :
 158   ShenandoahRootProcessor(phase),
 159   _thread_roots(n_workers > 1),
 160   _include_concurrent_roots(include_concurrent_roots) {
 161 }
 162 
 163 void ShenandoahRootEvacuator::roots_do(uint worker_id, OopClosure* oops) {
 164   MarkingCodeBlobClosure blobsCl(oops, CodeBlobToOopClosure::FixRelocations);
 165   CLDToOopClosure clds(oops, ClassLoaderData::_claim_strong);
 166   AlwaysTrueClosure always_true;
 167 
 168   _serial_roots.oops_do(oops, worker_id);
 169   _serial_weak_roots.weak_oops_do(oops, worker_id);
 170   if (_include_concurrent_roots) {

 171     _jni_roots.oops_do<OopClosure>(oops, worker_id);

 172     _weak_roots.oops_do<OopClosure>(oops, worker_id);
 173   }
 174 
 175   _thread_roots.oops_do(oops, NULL, worker_id);
 176   _cld_roots.cld_do(&clds, worker_id);
 177   _code_roots.code_blobs_do(&blobsCl, worker_id);
 178 
 179   _dedup_roots.oops_do(&always_true, oops, worker_id);
 180 }
 181 
 182 ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool update_code_cache) :
 183   ShenandoahRootProcessor(phase),
 184   _thread_roots(n_workers > 1),
 185   _update_code_cache(update_code_cache) {
 186 }
 187 
 188 ShenandoahRootAdjuster::ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
 189   ShenandoahRootProcessor(phase),
 190   _thread_roots(n_workers > 1) {
 191   assert(ShenandoahHeap::heap()->is_full_gc_in_progress(), "Full GC only");
 192 }
 193 
 194 void ShenandoahRootAdjuster::roots_do(uint worker_id, OopClosure* oops) {
 195   CodeBlobToOopClosure adjust_code_closure(oops, CodeBlobToOopClosure::FixRelocations);
 196   CLDToOopClosure adjust_cld_closure(oops, ClassLoaderData::_claim_strong);




 145 ShenandoahRootProcessor::ShenandoahRootProcessor(ShenandoahPhaseTimings::Phase phase) :
 146   _heap(ShenandoahHeap::heap()),
 147   _phase(phase) {
 148   assert(SafepointSynchronize::is_at_safepoint(), "Must at safepoint");
 149   _heap->phase_timings()->record_workers_start(_phase);
 150 }
 151 
 152 ShenandoahRootProcessor::~ShenandoahRootProcessor() {
 153   assert(SafepointSynchronize::is_at_safepoint(), "Must at safepoint");
 154   _heap->phase_timings()->record_workers_end(_phase);
 155 }
 156 
 157 ShenandoahRootEvacuator::ShenandoahRootEvacuator(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool include_concurrent_roots) :
 158   ShenandoahRootProcessor(phase),
 159   _thread_roots(n_workers > 1),
 160   _include_concurrent_roots(include_concurrent_roots) {
 161 }
 162 
 163 void ShenandoahRootEvacuator::roots_do(uint worker_id, OopClosure* oops) {
 164   MarkingCodeBlobClosure blobsCl(oops, CodeBlobToOopClosure::FixRelocations);

 165   AlwaysTrueClosure always_true;
 166 
 167   _serial_roots.oops_do(oops, worker_id);
 168   _serial_weak_roots.weak_oops_do(oops, worker_id);
 169   if (_include_concurrent_roots) {
 170     CLDToOopClosure clds(oops, ClassLoaderData::_claim_strong);
 171     _jni_roots.oops_do<OopClosure>(oops, worker_id);
 172     _cld_roots.cld_do(&clds, worker_id);
 173     _weak_roots.oops_do<OopClosure>(oops, worker_id);
 174   }
 175 
 176   _thread_roots.oops_do(oops, NULL, worker_id);

 177   _code_roots.code_blobs_do(&blobsCl, worker_id);
 178 
 179   _dedup_roots.oops_do(&always_true, oops, worker_id);
 180 }
 181 
 182 ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase, bool update_code_cache) :
 183   ShenandoahRootProcessor(phase),
 184   _thread_roots(n_workers > 1),
 185   _update_code_cache(update_code_cache) {
 186 }
 187 
 188 ShenandoahRootAdjuster::ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
 189   ShenandoahRootProcessor(phase),
 190   _thread_roots(n_workers > 1) {
 191   assert(ShenandoahHeap::heap()->is_full_gc_in_progress(), "Full GC only");
 192 }
 193 
 194 void ShenandoahRootAdjuster::roots_do(uint worker_id, OopClosure* oops) {
 195   CodeBlobToOopClosure adjust_code_closure(oops, CodeBlobToOopClosure::FixRelocations);
 196   CLDToOopClosure adjust_cld_closure(oops, ClassLoaderData::_claim_strong);


< prev index next >