RFR(t) 8217424 Remove the idempotent parameter to Method::sort_methods

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Jan 22 13:33:27 UTC 2019


I checked out of curiousity, this is what it used to do:

   // Prevent qsort from reordering a previous valid sort by
   // considering the address of the methodOops if two methods
   // would otherwise compare as equal.  Required to preserve
   // optimal access order in the shared archive.  Slower than
   // method_compare, only used for shared archive creation.
   static int method_compare_idempotent(methodOop* a, methodOop* b) {
     int i = method_compare(a, b);
     if (i != 0) return i;
     return ( a < b ? -1 : (a == b ? 0 : 1));
   }

So if the Method name was the same it would preserve the order in the 
CDS archive.  Not sure why that would have been optimial.
Looks good!
Coleen

On 1/22/19 12:30 AM, Ioi Lam wrote:
> Please review this trivial change.
>
> The "idempotent" parameter to Method::sort_methods() is always false, 
> so let's just remove it.
>
> https://bugs.openjdk.java.net/browse/JDK-8217424
> http://cr.openjdk.java.net/~iklam/jdk13/8217424-sort-methods-idempotent-param.v01/ 
>
>
> Thanks
> - Ioi



More information about the hotspot-runtime-dev mailing list