Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161210 slowdown in MHs.iteratedLoop handles
  3. JDK-8166840

Synthetic bridge constructor in ArrayList$Itr blocks inlining

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Backports

        Description

        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. It thus makes sense to do this simple change in this particular case as a quick fix and solve the larger C2 issue separately.

        [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-September/024407.html

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                redestad Claes Redestad
                Reporter:
                redestad Claes Redestad
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: