8236815: Shenandoah: Fix weak roots in final Traversal GC phase

Reviewed-by: zgu
This commit is contained in:
Roman Kennke 2020-01-08 22:46:33 +01:00
parent 4671b57e12
commit 35303ae5ab
3 changed files with 3 additions and 16 deletions

View File

@ -203,18 +203,6 @@ ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimi
_thread_roots(n_workers > 1) {
}
void ShenandoahRootUpdater::strong_roots_do(uint worker_id, OopClosure* oops_cl) {
CodeBlobToOopClosure update_blobs(oops_cl, CodeBlobToOopClosure::FixRelocations);
CLDToOopClosure clds(oops_cl, ClassLoaderData::_claim_strong);
_serial_roots.oops_do(oops_cl, worker_id);
_vm_roots.oops_do(oops_cl, worker_id);
_thread_roots.oops_do(oops_cl, NULL, worker_id);
_cld_roots.cld_do(&clds, worker_id);
_code_roots.code_blobs_do(&update_blobs, worker_id);
}
ShenandoahRootAdjuster::ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
ShenandoahRootProcessor(phase),
_thread_roots(n_workers > 1) {

View File

@ -306,8 +306,6 @@ public:
template<typename IsAlive, typename KeepAlive>
void roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive);
void strong_roots_do(uint worker_id, OopClosure* oops_cl);
};
// Adjuster all roots at a safepoint during full gc

View File

@ -605,8 +605,8 @@ void ShenandoahTraversalGC::final_traversal_collection() {
_heap->set_concurrent_traversal_in_progress(false);
_heap->mark_complete_marking_context();
fixup_roots();
_heap->parallel_cleaning(false);
fixup_roots();
_heap->set_has_forwarded_objects(false);
@ -707,7 +707,8 @@ public:
void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahTraversalFixRootsClosure cl;
_rp->strong_roots_do(worker_id, &cl);
ShenandoahForwardedIsAliveClosure is_alive;
_rp->roots_do(worker_id, &is_alive, &cl);
}
};