Skip to content
Permalink
Browse files

8236681: Shenandoah: Disable concurrent class unloading flag if no cl…

…ass unloading for the GC cycle

Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed Jan 7, 2020
1 parent 49b1cc8 commit 9e09ba5e138b3d8ada816ded9c17e10358575299
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp
@@ -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::can_do_concurrent_class_unloading() {
}

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();
}

0 comments on commit 9e09ba5

Please sign in to comment.