OpenJDK / jdk / jdk
changeset 57596:4ba039864f2a
8236681: Shenandoah: Disable concurrent class unloading flag if no class unloading for the GC cycle
Reviewed-by: rkennke
author | zgu |
---|---|
date | Tue, 07 Jan 2020 08:53:37 -0500 |
parents | ef7777a6f84d |
children | 129ba7bcbe21 |
files | src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp Tue Jan 07 13:45:10 2020 +0100 +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp Tue Jan 07 08:53:37 2020 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Red Hat, Inc. All rights reserved. + * Copyright (c) 2019, 2020, Red Hat, Inc. All rights reserved. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as @@ -47,6 +47,8 @@ } bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() { + ShenandoahHeap* const heap = ShenandoahHeap::heap(); return can_do_concurrent_class_unloading() && - !ShenandoahHeap::heap()->is_stw_gc_in_progress(); + heap->unload_classes() && + !heap->is_stw_gc_in_progress(); }