Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8257817: Shenandoah: Don't race with conc-weak-in-progress flag in we…
…ak-LRB

Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed Dec 7, 2020
1 parent a265c20 commit 395b6bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Expand Up @@ -2063,16 +2063,17 @@ void ShenandoahHeap::op_weak_roots() {
ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_weak_roots_work);
ShenandoahConcurrentWeakRootsEvacUpdateTask task(ShenandoahPhaseTimings::conc_weak_roots_work);
workers()->run_task(&task);
if (!ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
set_concurrent_weak_root_in_progress(false);
}
}

// Perform handshake to flush out dead oops
{
ShenandoahTimingsTracker t(ShenandoahPhaseTimings::conc_weak_roots_rendezvous);
rendezvous_threads();
}

if (!ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
set_concurrent_weak_root_in_progress(false);
}
}
}

Expand Down

1 comment on commit 395b6bd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.