--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp Wed Nov 27 06:36:41 2019 -0800
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp Wed Nov 27 11:52:57 2019 -0500
@@ -32,9 +32,21 @@
}
bool ShenandoahConcurrentRoots::should_do_concurrent_roots() {
- ShenandoahHeap* const heap = ShenandoahHeap::heap();
- bool stw_gc_in_progress = heap->is_full_gc_in_progress() ||
- heap->is_degenerated_gc_in_progress();
return can_do_concurrent_roots() &&
- !stw_gc_in_progress;
+ !ShenandoahHeap::heap()->is_stw_gc_in_progress();
}
+
+bool ShenandoahConcurrentRoots::can_do_concurrent_class_unloading() {
+#if defined(X86) && !defined(SOLARIS)
+ return ShenandoahCodeRootsStyle == 2 &&
+ ClassUnloading &&
+ strcmp(ShenandoahGCMode, "traversal") != 0;
+#else
+ return false;
+#endif
+}
+
+bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() {
+ return can_do_concurrent_class_unloading() &&
+ !ShenandoahHeap::heap()->is_stw_gc_in_progress();
+}