Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8286467

G1: Collection set pruning adds one region too many

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • gc
    • b23

      The following if statement in the do_heap_region function of G1PruneRegionClosure:

      > if (_num_pruned > _max_pruned ||
      > _cur_wasted + reclaimable > _max_wasted) {
      > return true;
      > }

      should be >=, otherwise one too many region than intended will be added.

      Impact is limited, as the pruning is an inherently inexact and conservative heuristics driven process.

      Reported by Tianqi Xia (https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2022-May/039287.html)

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: