RFR (S) CR 8014966: Add the proper Javadoc to @Contended

Peter Levart peter.levart at gmail.com
Thu May 23 15:57:34 UTC 2013


On 05/23/2013 04:33 PM, Mike Duigou wrote:
> Looks good. If you haven't found someone to push it by tomorrow then I can. (I am travelling today).
>
> A class level annotation on a class containing no annotated fields has no effect, correct?

Hi Mike,

As far as I understand the javadoc, it means the same as if all fields 
were annotated with the same tag. Each instance of annotation has either 
a named tag or an anonymous tag (when left as default). Annotation on 
the class level "tags" all un-annotated fields with the same tag (either 
named or anonymous). Fields with same tag are grouped in separate 
contention group. Fields with no tag are left out and are not "padded" 
from the start or end of object. So the difference between plain class 
and class with single @Contended() annotation on the class level is that 
in the later case there will be padding at start of object and at end of 
object, but in former case there will be no padding.

Have I understood this correctly?

Regards, Peter

> Mike
>
> On May 23 2013, at 02:51 , Aleksey Shipilev wrote:
>
>> On 05/21/2013 04:35 PM, Aleksey Shipilev wrote:
>>> Hi,
>>>
>>> It is time to add the proper Javadoc to @Contended:
>>>   http://cr.openjdk.java.net/~shade/8014966/webrev.01/
>>>
>>> Testing:
>>>   - built jdk8-tl on Linux x86_64/release without a hitch.
>>>
>>> Please review and sponsor!
>> Friendly reminder.
>>
>> -Aleksey.
>>




More information about the core-libs-dev mailing list