[jmm-dev] @Contended

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Apr 27 11:41:21 UTC 2016


Andrew,

This question arises on a regular basis and was discussed in details on 
hotspot-related mailing lists [1].

So far, John Rose provided the most elaborate answer [2].

Best regards,
Vladimir Ivanov

[1] 
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2015-November/016432.html

[2] 
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2015-November/016535.html


On 4/27/16 12:33 PM, Andrew Haley wrote:
> The issue of contention has come up and it reminds me of an issue I'd
> wondered about.
>
> Why is @Contended in sun.misc?  Why is it only available to system
> code?  It's surely better to allow programmers to use this annotation
> than to pad their objects with dummy fields to prevent false sharing.
>
> Andrew.
>


More information about the jmm-dev mailing list