< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp
Print this page
rev 59534 : 8245961: Shenandoah: move some root marking to concurrent phase
*** 26,35 ****
--- 26,36 ----
#include "classfile/classLoaderDataGraph.hpp"
#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp"
+ #include "code/nmethod.hpp"
#include "gc/shenandoah/shenandoahClosures.inline.hpp"
#include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
#include "gc/shenandoah/shenandoahRootProcessor.inline.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
*** 197,210 ****
ShenandoahRootScanner::ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
ShenandoahRootProcessor(phase),
_serial_roots(phase),
_thread_roots(phase, n_workers > 1),
! _code_roots(phase),
! _vm_roots(phase),
! _dedup_roots(phase),
! _cld_roots(phase) {
}
void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops) {
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations);
--- 198,213 ----
ShenandoahRootScanner::ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
ShenandoahRootProcessor(phase),
_serial_roots(phase),
_thread_roots(phase, n_workers > 1),
! _dedup_roots(phase) {
! nmethod::oops_do_marking_prologue();
! }
!
! ShenandoahRootScanner::~ShenandoahRootScanner() {
! nmethod::oops_do_marking_epilogue();
}
void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops) {
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations);
*** 222,236 ****
!ShenandoahHeap::heap()->unload_classes(),
"Expect class unloading when Shenandoah cycle is running");
ResourceMark rm;
_serial_roots.oops_do(oops, worker_id);
- _vm_roots.oops_do(oops, worker_id);
-
- assert(clds != NULL, "Only possible with CLD closure");
- _cld_roots.cld_do(clds, worker_id);
-
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
_thread_roots.threads_do(&tc_cl, worker_id);
AlwaysTrueClosure always_true;
_dedup_roots.oops_do(&always_true, oops, worker_id);
--- 225,234 ----
*** 240,251 ****
assert(ShenandoahHeap::heap()->unload_classes(), "Should be used during class unloading");
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
ResourceMark rm;
_serial_roots.oops_do(oops, worker_id);
- _vm_roots.oops_do(oops, worker_id);
- _cld_roots.always_strong_cld_do(clds, worker_id);
_thread_roots.threads_do(&tc_cl, worker_id);
}
ShenandoahRootEvacuator::ShenandoahRootEvacuator(uint n_workers,
ShenandoahPhaseTimings::Phase phase,
--- 238,247 ----
< prev index next >