[8u76] Request for approval: 8131782: C1 Class.cast optimization breaks when Class is loaded from static final

Rob McKenna rob.mckenna at oracle.com
Thu Dec 3 17:22:53 UTC 2015

Approved. Please work with your colleagues on the hotspot team to find a 
sponsor & please add an appropriate noreg label to the bug.


On 03/12/15 17:18, Aleksey Shipilev wrote:
> Hi,
> We'd like to backport a simple Hotspot compiler change that serves as
> the important prerequisite for another upcoming JDK backport for
> Atomic*FieldUpdaters (A*FU) performance.
> Bug:
>    https://bugs.openjdk.java.net/browse/JDK-8131782
> The dependency is simple: C1 intrinsics for Class methods distrust the
> classes loaded from final fields due to an oddity in constant parsing.
> When A*FU implementations do the typechecks/casts against the target
> classes loaded from their internal final fields, those operations are
> not folded, but really should be. It is not visible now, since current
> 8u code does the direct class check, but it will be important when we
> backport that other A*FU change
> (https://bugs.openjdk.java.net/browse/JDK-8140587).
> As other A*FU-related patches, thus provides a migration path with the
> eventual demise of sun.misc.Unsafe. Therefore, I'd like us to consider
> this in 8u76 to expose users to this improvement earlier than JDK 9 release.
> I am not a 8u Committer, so if the change is approved, I'd need a sponsor.
> Webrev:
>    http://cr.openjdk.java.net/~shade/8131782/webrev.02/
> JDK 9 Changeset:
>    http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/df802f98b828
> JDK 9 Review:
> http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2015-July/018473.html
> The change was in jdk9 since August 2015. The patch applies without
> fuzz. jdk8u builds and runs fine at least on Linux x86_64, the
> performance improvement is the same as in JDK 9.
> Thanks,
> -Aleksey

More information about the jdk8u-dev mailing list