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

G1: Simplify region index comparison

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b10

      Description

      diff --git a/src/hotspot/share/gc/g1/g1CollectionSet.cpp b/src/hotspot/share/gc/g1/g1CollectionSet.cpp
      index f77a16d7a7e..c6fb67af679 100644
      --- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp
      +++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp
      @@ -458,13 +458,7 @@ double G1CollectionSet::finalize_young_part(double target_pause_time_ms, G1Survi
       }

       static int compare_region_idx(const uint a, const uint b) {
      - if (a > b) {
      - return 1;
      - } else if (a == b) {
      - return 0;
      - } else {
      - return -1;
      - }
      + return a-b;
       }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mli Hamlin Li
              Reporter:
              mli Hamlin Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: