-
Sub-task
-
Resolution: Fixed
-
P4
-
None
-
b139
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183742 | 8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8166853 | 8u152 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8192482 | emb-8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
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
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
- backported by
-
JDK-8166853 Synthetic bridge constructor in ArrayList$Itr blocks inlining
- Resolved
-
JDK-8183742 Synthetic bridge constructor in ArrayList$Itr blocks inlining
- Resolved
-
JDK-8192482 Synthetic bridge constructor in ArrayList$Itr blocks inlining
- Resolved
- relates to
-
JDK-8167005 Comment on the need for an empty constructor in ArrayList$Itr
- Closed
-
JDK-8161210 slowdown in MHs.iteratedLoop handles
- Open