[concurrency-interest] AtomicReferenceArray.get() and intrinsics method inlining

Aleksey Shipilev shade at redhat.com
Thu Jan 16 15:35:32 EST 2020


On 1/16/20 9:28 PM, Manuel Dominguez Sarmiento wrote:
> We used Oracle JDK 1.8.0_212 on Mac OS X to produce the reported results. Update 212 is from April
> 2019 so it's not that old anyway.

Wait, now *that* sounds familiar.

Plus the original observation:

> After careful studying of stock Java8 ConcurrentHashMap.get(), we found that the reason why that
>  method was being successfully inlined is the (tab = table) != null check before tabAt() is 
> invoked. Apparently, the HotSpot compiler is unable to inline getObjectVolatile() unless it can 
> verify thatits main argument will always be non-null.
Suggests this:
  https://bugs.openjdk.java.net/browse/JDK-8221355

You should really try up-to-date JDK.

-- 
Thanks,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20200116/93d1cf39/attachment.sig>


More information about the Concurrency-interest mailing list