< prev index next >

src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp

Print this page
*** 21,15 ***
   * questions.
   *
   */
  
  #include "precompiled.hpp"
  #include "gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp"
  #include "gc/shenandoah/mode/shenandoahPassiveMode.hpp"
  #include "logging/log.hpp"
  #include "logging/logTag.hpp"
- #include "runtime/globals_extension.hpp"
  #include "runtime/java.hpp"
  
  void ShenandoahPassiveMode::initialize_flags() const {
    // Do not allow concurrent cycles.
    FLAG_SET_DEFAULT(ExplicitGCInvokesConcurrent, false);
--- 21,17 ---
   * questions.
   *
   */
  
  #include "precompiled.hpp"
+ #include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
+ #include "gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp"
  #include "gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp"
  #include "gc/shenandoah/mode/shenandoahPassiveMode.hpp"
+ #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  #include "logging/log.hpp"
  #include "logging/logTag.hpp"
  #include "runtime/java.hpp"
  
  void ShenandoahPassiveMode::initialize_flags() const {
    // Do not allow concurrent cycles.
    FLAG_SET_DEFAULT(ExplicitGCInvokesConcurrent, false);

*** 48,15 ***
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahSATBBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahIUBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCASBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCloneBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahStackWatermarkBarrier);
  
    // Final configuration checks
!   // No barriers are required to run.
  }
! ShenandoahHeuristics* ShenandoahPassiveMode::initialize_heuristics() const {
    if (ShenandoahGCHeuristics == nullptr) {
      vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option (null)");
    }
!   return new ShenandoahPassiveHeuristics();
  }
--- 50,19 ---
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahSATBBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahIUBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCASBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCloneBarrier);
    SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahStackWatermarkBarrier);
+   SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCardBarrier);
  
    // Final configuration checks
!   // Passive mode does not instantiate the machinery to support the card table.
+   // Exit if the flag has been explicitly set.
+   SHENANDOAH_CHECK_FLAG_UNSET(ShenandoahCardBarrier);
  }
! 
+ ShenandoahHeuristics* ShenandoahPassiveMode::initialize_heuristics(ShenandoahSpaceInfo* space_info) const {
    if (ShenandoahGCHeuristics == nullptr) {
      vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option (null)");
    }
!   return new ShenandoahPassiveHeuristics(space_info);
  }
< prev index next >