src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp
changeset 54477 511be32f3863
parent 54423 6c0ab8bd8da5
child 54833 76751d3faf7b
equal deleted inserted replaced
54476:20f7bbfc61d3 54477:511be32f3863
    79                                                                         size_t actual_free) {
    79                                                                         size_t actual_free) {
    80   assert(ShenandoahDegeneratedGC, "This path is only taken for Degenerated GC");
    80   assert(ShenandoahDegeneratedGC, "This path is only taken for Degenerated GC");
    81 
    81 
    82   // Do not select too large CSet that would overflow the available free space.
    82   // Do not select too large CSet that would overflow the available free space.
    83   // Take at least the entire evacuation reserve, and be free to overflow to free space.
    83   // Take at least the entire evacuation reserve, and be free to overflow to free space.
    84   size_t capacity  = ShenandoahHeap::heap()->capacity();
    84   size_t capacity  = ShenandoahHeap::heap()->max_capacity();
    85   size_t available = MAX2(ShenandoahEvacReserve * capacity / 100, actual_free);
    85   size_t available = MAX2(ShenandoahEvacReserve * capacity / 100, actual_free);
    86   size_t max_cset  = (size_t)(available / ShenandoahEvacWaste);
    86   size_t max_cset  = (size_t)(available / ShenandoahEvacWaste);
    87 
    87 
    88   log_info(gc, ergo)("CSet Selection. Actual Free: " SIZE_FORMAT "M, Max CSet: " SIZE_FORMAT "M",
    88   log_info(gc, ergo)("CSet Selection. Actual Free: " SIZE_FORMAT "M, Max CSet: " SIZE_FORMAT "M",
    89                      actual_free / M, max_cset / M);
    89                      actual_free / M, max_cset / M);