RFR [9] 8140687: Move @Contended to the jdk.internal.vm.annotation package

Peter Levart peter.levart at gmail.com
Mon Nov 9 12:34:45 UTC 2015



On 11/09/2015 01:32 PM, Peter Levart wrote:
>
>
> On 11/09/2015 11:43 AM, Chris Hegarty wrote:
>> On 02/11/15 10:45, Aleksey Shipilev wrote:
>>> On 11/02/2015 02:56 AM, Chris Hegarty wrote:
>>>> In line with the intended location for other VM annotations,
>>>> see 8138732 [1], @sun.misc.Contended should be moved
>>>> to the jdk.internal.vm.annotation package.
>>>>
>>>> http://cr.openjdk.java.net/~chegar/8140687/00/
>>>
>>> Changes look good to me.
>>>
>>> But what's the compatibility story for JSR 166? With this move, we 
>>> would
>>> be unable to bootclasspath JSR 166 JAR, since it references the "old"
>>> sun.misc.Contended?
>>
>> Correct.
>>
>> As you are aware, the 166 CVS will fork shortly to support
>> a JDK 9 only version. Artifacts built from the fork are of
>> course not impacted by this change.
>>
>> For existing 166 artifacts, they will not run on JDK 9 as
>> the Contended annotation will not be present.
>
> Note that they might actually be able to run. They would just not be 
> @Contended. As I understand, VM just checks the presence of 
> annotations by string value - it doesn't try to materialize them in 
> the form of objects, so it does not fail.

The possible solution would be for VM to support both annotations as 
aliases for some time.

>
> Regards, Peter
>
>>
>> -Chris.
>>
>>> Thanks,
>>> -Aleksey
>>>
>



More information about the hotspot-runtime-dev mailing list