Skip to content

Commit

Permalink
8255955: Shenandoah: Only STW GC should process concurrent roots at p…
Browse files Browse the repository at this point in the history
…auses

Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed Nov 5, 2020
1 parent d6f0940 commit fc894ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2416,17 +2416,17 @@ void ShenandoahHeap::stw_process_weak_roots(bool full_gc) {
ShenandoahForwardedIsAliveClosure is_alive;
ShenandoahUpdateRefsClosure keep_alive;
ShenandoahParallelWeakRootsCleaningTask<ShenandoahForwardedIsAliveClosure, ShenandoahUpdateRefsClosure>
cleaning_task(timing_phase, &is_alive, &keep_alive, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
cleaning_task(timing_phase, &is_alive, &keep_alive, num_workers, is_stw_gc_in_progress());
_workers->run_task(&cleaning_task);
} else {
ShenandoahIsAliveClosure is_alive;
#ifdef ASSERT
ShenandoahAssertNotForwardedClosure verify_cl;
ShenandoahParallelWeakRootsCleaningTask<ShenandoahIsAliveClosure, ShenandoahAssertNotForwardedClosure>
cleaning_task(timing_phase, &is_alive, &verify_cl, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
cleaning_task(timing_phase, &is_alive, &verify_cl, num_workers, is_stw_gc_in_progress());
#else
ShenandoahParallelWeakRootsCleaningTask<ShenandoahIsAliveClosure, DoNothingClosure>
cleaning_task(timing_phase, &is_alive, &do_nothing_cl, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
cleaning_task(timing_phase, &is_alive, &do_nothing_cl, num_workers, is_stw_gc_in_progress());
#endif
_workers->run_task(&cleaning_task);
}
Expand Down

1 comment on commit fc894ab

@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.