< prev index next >

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

Print this page

        

@@ -26,15 +26,27 @@
 #include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
 
 bool ShenandoahConcurrentRoots::can_do_concurrent_roots() {
   // Don't support traversal GC at this moment
-  return !ShenandoahHeap::heap()->is_concurrent_traversal_in_progress();
+  return !ShenandoahHeap::heap()->is_traversal_mode();
 }
 
 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(_LP64) && 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();
 }
< prev index next >