< prev index next >

src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp

Print this page
*** 29,10 ***
--- 29,13 ---
  #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
  #include "logging/log.hpp"
  #include "logging/logTag.hpp"
  
+ ShenandoahPassiveHeuristics::ShenandoahPassiveHeuristics(ShenandoahSpaceInfo* space_info) :
+   ShenandoahHeuristics(space_info) {}
+ 
  bool ShenandoahPassiveHeuristics::should_start_gc() {
    // Never do concurrent GCs.
    return false;
  }
  

*** 51,11 ***
                                                                          size_t actual_free) {
    assert(ShenandoahDegeneratedGC, "This path is only taken for Degenerated GC");
  
    // Do not select too large CSet that would overflow the available free space.
    // Take at least the entire evacuation reserve, and be free to overflow to free space.
!   size_t max_capacity = ShenandoahHeap::heap()->max_capacity();
    size_t available = MAX2(max_capacity / 100 * ShenandoahEvacReserve, actual_free);
    size_t max_cset  = (size_t)(available / ShenandoahEvacWaste);
  
    log_info(gc, ergo)("CSet Selection. Actual Free: " SIZE_FORMAT "%s, Max CSet: " SIZE_FORMAT "%s",
                       byte_size_in_proper_unit(actual_free), proper_unit_for_byte_size(actual_free),
--- 54,11 ---
                                                                          size_t actual_free) {
    assert(ShenandoahDegeneratedGC, "This path is only taken for Degenerated GC");
  
    // Do not select too large CSet that would overflow the available free space.
    // Take at least the entire evacuation reserve, and be free to overflow to free space.
!   size_t max_capacity = _space_info->max_capacity();
    size_t available = MAX2(max_capacity / 100 * ShenandoahEvacReserve, actual_free);
    size_t max_cset  = (size_t)(available / ShenandoahEvacWaste);
  
    log_info(gc, ergo)("CSet Selection. Actual Free: " SIZE_FORMAT "%s, Max CSet: " SIZE_FORMAT "%s",
                       byte_size_in_proper_unit(actual_free), proper_unit_for_byte_size(actual_free),
< prev index next >