RFR: 8166840: Synthetic bridge constructor in ArrayList$Itr blocks inlining
Claes Redestad
claes.redestad at oracle.com
Wed Sep 28 14:37:28 UTC 2016
I dealt with this in isolation deliberately to ease backporting, but I
don't have the 8u committer rights to do it myself.
/Claes
On 2016-09-28 16:27, Vitaly Davidovich wrote:
> Thanks Claes - this is an annoying one!
>
> Will it be backported to 8?
>
> On Wednesday, September 28, 2016, Claes Redestad
> <claes.redestad at oracle.com <mailto:claes.redestad at oracle.com>> wrote:
>
> Thanks for the quick reviews!
>
> /Claes
>
> On 2016-09-28 14:14, Remi Forax wrote:
>
> yes,
> thumb up.
>
> Rémi
>
>
> On September 28, 2016 1:51:18 PM GMT+02:00, Michael Haupt
> <michael.haupt at oracle.com> wrote:
>
> Hi Claes,
>
> yes please. Thumbs up. :-)
>
> Best,
>
> Michael
>
> Am 28.09.2016 um 13:48 schrieb Claes Redestad
>
> <claes.redestad at oracle.com>:
>
> Hi,
>
> as discussed recently on hotspot-compiler-dev[1],
> having a private
>
> class with no default constructor can lead to C2 failing
> to inline, due
> to the synthetic bridge constructor using a dummy argument
> of an
> uninitialized class. This is really a problem in C2, as
> well as
> something which could ultimately be resolved by nestmates...
>
> However, there is an easy workaround in adding an empty
>
> package-private constructor. In the most recently found
> case - a
> microbenchmark stressing MethodHandles.iteratedLoop -
> adding this to
> ArrayList$Itr lead to a 2.5-3x speedup.
>
> This is me asking nicely to do a quick-fix for this in
>
> java.util.ArrayList$Itr now:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8166840
> <https://bugs.openjdk.java.net/browse/JDK-8166840>
> Webrev:
> http://cr.openjdk.java.net/~redestad/8166840/webrev.01/
> <http://cr.openjdk.java.net/%7Eredestad/8166840/webrev.01/>
>
> Thanks!
>
> /Claes
>
> [1]
>
> http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-September/024407.html
> <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-September/024407.html>
>
> --
>
> <http://www.oracle.com/>
> Dr. Michael Haupt | Principal Member of Technical Staff
> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
> Oracle Java Platform Group | LangTools Team | Nashorn
> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 |
> 14467 Potsdam,
> Germany
>
> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung:
> Riesstraße 25,
> D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V. |
> Hertogswetering
> 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Nederland, Nr.
> 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss,
> Val Maher
> <http://www.oracle.com/commitment
> <http://www.oracle.com/commitment>> Oracle is
> committed to developing
> practices and products that help protect the environment
>
>
>
>
> --
> Sent from my phone
More information about the core-libs-dev
mailing list