RFR: 8219713: Reduce work in DefaultMethods::generate_default_methods
Harold Seigel
harold.seigel at oracle.com
Wed Feb 27 20:28:14 UTC 2019
Hi Claes,
I think these changes look good!
Thanks, Harold
On 2/27/2019 9:23 AM, Claes Redestad wrote:
> Hi,
>
> on modern, larger applications, DefaultMethods::generate_default_methods
> can show up prominently in startup profiles, so I took a stab at dealing
> with some apparent inefficiencies:
>
> - java.lang.Object is scanned at least once for every interface in the
> hierarchy - this will be a no-op after the first so we should filter
> out Object except the first time we encounter it.
>
> - the resolveNatives and <clinit> are added and checked for every
> class/interface scanned, but then explicitly filtered out later on. It
> seems that all static initializers and private static methods can be
> safely filtered out from the first pass since they wouldn't mask default
> methods anyhow.
>
> - a few minor cleanups and simplifications, e.g., removing never
> exercised code to cancel and reset an iteration.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8219713
> Webrev: http://cr.openjdk.java.net/~redestad/8219713/open.01/
>
> Testing: tier1-3, measured a speed-up on certain startup application
>
> Thanks!
>
> /Claes
More information about the hotspot-runtime-dev
mailing list