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

G1: Simplify region index comparison

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 18
    • 18
    • hotspot
    • gc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: