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

G1: Simplify region index comparison

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • gc
    • b10

      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;
       }

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

              Created:
              Updated:
              Resolved: