Skip to content

Commit fc894ab

Browse files
committed
8255955: Shenandoah: Only STW GC should process concurrent roots at pauses
Reviewed-by: rkennke
1 parent d6f0940 commit fc894ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,17 +2416,17 @@ void ShenandoahHeap::stw_process_weak_roots(bool full_gc) {
24162416
ShenandoahForwardedIsAliveClosure is_alive;
24172417
ShenandoahUpdateRefsClosure keep_alive;
24182418
ShenandoahParallelWeakRootsCleaningTask<ShenandoahForwardedIsAliveClosure, ShenandoahUpdateRefsClosure>
2419-
cleaning_task(timing_phase, &is_alive, &keep_alive, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
2419+
cleaning_task(timing_phase, &is_alive, &keep_alive, num_workers, is_stw_gc_in_progress());
24202420
_workers->run_task(&cleaning_task);
24212421
} else {
24222422
ShenandoahIsAliveClosure is_alive;
24232423
#ifdef ASSERT
24242424
ShenandoahAssertNotForwardedClosure verify_cl;
24252425
ShenandoahParallelWeakRootsCleaningTask<ShenandoahIsAliveClosure, ShenandoahAssertNotForwardedClosure>
2426-
cleaning_task(timing_phase, &is_alive, &verify_cl, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
2426+
cleaning_task(timing_phase, &is_alive, &verify_cl, num_workers, is_stw_gc_in_progress());
24272427
#else
24282428
ShenandoahParallelWeakRootsCleaningTask<ShenandoahIsAliveClosure, DoNothingClosure>
2429-
cleaning_task(timing_phase, &is_alive, &do_nothing_cl, num_workers, !ShenandoahConcurrentRoots::should_do_concurrent_class_unloading());
2429+
cleaning_task(timing_phase, &is_alive, &do_nothing_cl, num_workers, is_stw_gc_in_progress());
24302430
#endif
24312431
_workers->run_task(&cleaning_task);
24322432
}

0 commit comments

Comments
 (0)