RFR (S) CR 8014966: Add the proper Javadoc to @Contended
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu May 23 18:23:28 UTC 2013
Oh yes, the tag on the class-level annotation has no effect.
-Aleksey.
On 05/23/2013 09:37 PM, Peter Levart wrote:
> Hi Aleksey,
>
> What's not very clear is whether the class-level @Contended is the same
> as class-level @Contended("group") - is the tag used or ignored when
> specified on the class-level. What does the following do?
>
> @Contended("x")
> class C {
> @Contended("x") int a;
> @Contended("y") int b;
> int c;
> }
>
>
> Regards, Peter
>
>
> On 05/23/2013 06:16 PM, Aleksey Shipilev wrote:
>> On 05/23/2013 07:57 PM, Peter Levart wrote:
>>> Have I understood this correctly?
>> Yes. @Contended on class is currently the shorthand for the @Contended
>> with the same (but unknown) tag over all the fields. However, in future
>> this might change, because @Contended on class might also guard the
>> object header, as soon as we are brave enough to tap into the GC
>> interface to allocate the @C objects aligned for the cache line boundary.
>>
>> -Aleksey.
>
More information about the core-libs-dev
mailing list