RFC (S) 8140483: Atomic*FieldUpdaters final fields should be trusted

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Oct 27 00:04:08 UTC 2015


On 10/27/2015 02:52 AM, Vitaly Davidovich wrote:
> In this particular case, A*FU is doing obj.getClass() == tclass as a
> cheaper check than what fullCheck() does, which is
> tclass.isInstance(obj).  However, theoretically speaking, if A*FU op is
> inlined into an instance method where `this` is passed, it should be
> able to determine at JIT time whether `this` is tclass or subtype of
> it.  Then that whole type check could be removed.

Yes, I get that. It may be profitable to check Class.isInstance, instead
of the exact match, so that subclasses are also acceptable. And it
indeed does help to eliminate the type check.

Thanks,
-Aleksey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151027/43b249b0/signature.asc>


More information about the hotspot-compiler-dev mailing list