mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8236815: Shenandoah: Fix weak roots in final Traversal GC phase
Reviewed-by: zgu
This commit is contained in:
parent
d6a5897f41
commit
4a84146e43
3 changed files with 3 additions and 16 deletions
|
@ -203,18 +203,6 @@ ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimi
|
||||||
_thread_roots(n_workers > 1) {
|
_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) :
|
ShenandoahRootAdjuster::ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase) :
|
||||||
ShenandoahRootProcessor(phase),
|
ShenandoahRootProcessor(phase),
|
||||||
_thread_roots(n_workers > 1) {
|
_thread_roots(n_workers > 1) {
|
||||||
|
|
|
@ -305,8 +305,6 @@ public:
|
||||||
|
|
||||||
template<typename IsAlive, typename KeepAlive>
|
template<typename IsAlive, typename KeepAlive>
|
||||||
void roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive);
|
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
|
// Adjuster all roots at a safepoint during full gc
|
||||||
|
|
|
@ -608,8 +608,8 @@ void ShenandoahTraversalGC::final_traversal_collection() {
|
||||||
_heap->set_concurrent_traversal_in_progress(false);
|
_heap->set_concurrent_traversal_in_progress(false);
|
||||||
_heap->mark_complete_marking_context();
|
_heap->mark_complete_marking_context();
|
||||||
|
|
||||||
fixup_roots();
|
|
||||||
_heap->parallel_cleaning(false);
|
_heap->parallel_cleaning(false);
|
||||||
|
fixup_roots();
|
||||||
|
|
||||||
_heap->set_has_forwarded_objects(false);
|
_heap->set_has_forwarded_objects(false);
|
||||||
|
|
||||||
|
@ -710,7 +710,8 @@ public:
|
||||||
void work(uint worker_id) {
|
void work(uint worker_id) {
|
||||||
ShenandoahParallelWorkerSession worker_session(worker_id);
|
ShenandoahParallelWorkerSession worker_session(worker_id);
|
||||||
ShenandoahTraversalFixRootsClosure cl;
|
ShenandoahTraversalFixRootsClosure cl;
|
||||||
_rp->strong_roots_do(worker_id, &cl);
|
ShenandoahForwardedIsAliveClosure is_alive;
|
||||||
|
_rp->roots_do(worker_id, &is_alive, &cl);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue