< prev index next >

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

Print this page
rev 59383 : [mq]: final


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
  28 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  29 
  30 bool ShenandoahConcurrentRoots::can_do_concurrent_roots() {
  31   return true;
  32 }
  33 
  34 bool ShenandoahConcurrentRoots::should_do_concurrent_roots() {
  35   return can_do_concurrent_roots() &&
  36          !ShenandoahHeap::heap()->is_stw_gc_in_progress();
  37 }
  38 
  39 bool ShenandoahConcurrentRoots::can_do_concurrent_class_unloading() {
  40 #if (defined(X86) || defined(AARCH64)) && !defined(SOLARIS)
  41   return ShenandoahCodeRootsStyle == 2 &&
  42          ClassUnloading;
  43 #else
  44   return false;
  45 #endif
  46 }
  47 
  48 bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() {
  49   ShenandoahHeap* const heap = ShenandoahHeap::heap();
  50   return can_do_concurrent_class_unloading() &&
  51          heap->unload_classes() &&
  52          !heap->is_stw_gc_in_progress();
  53 }


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
  28 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  29 
  30 bool ShenandoahConcurrentRoots::can_do_concurrent_roots() {
  31   return true;
  32 }
  33 
  34 bool ShenandoahConcurrentRoots::should_do_concurrent_roots() {
  35   return can_do_concurrent_roots() &&
  36          !ShenandoahHeap::heap()->is_stw_gc_in_progress();
  37 }
  38 
  39 bool ShenandoahConcurrentRoots::can_do_concurrent_class_unloading() {
  40 #if (defined(X86) || defined(AARCH64))
  41   return ShenandoahCodeRootsStyle == 2 &&
  42          ClassUnloading;
  43 #else
  44   return false;
  45 #endif
  46 }
  47 
  48 bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() {
  49   ShenandoahHeap* const heap = ShenandoahHeap::heap();
  50   return can_do_concurrent_class_unloading() &&
  51          heap->unload_classes() &&
  52          !heap->is_stw_gc_in_progress();
  53 }
< prev index next >