RFR (M): CR 8003985: Support @Contended Annotation - JEP 142

Christian Thalinger christian.thalinger at oracle.com
Thu Nov 29 10:28:40 PST 2012


On Nov 27, 2012, at 9:57 AM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:

> Hi,
> 
> This is the daizy-fresh thread for reviewing the actual changes to
> support the JEP-142 in HotSpot. Please address API issues about
> @Contended to concurrency-interest list, Doug had started the thread here:
> 
> http://cs.oswego.edu/pipermail/concurrency-interest/2012-November/010208.html
> 
> We are not discussing the design, API and all the general stuff here,
> only the reference implementation. I would like to have someone extra
> knowledgeable in HotSpot codebase to see whether I do anything stupid there.
> 
> The webrev for the change is here:
>  http://shipilev.net/pub/jdk/hotspot/contended/webrev-4/

Is this a review for a push?

hotspot/src/share/vm/classfile/classFileParser.cpp:

Is it possible to factor the while-loop to align the fields into a method?

hotspot/src/share/vm/classfile/classFileParser.hpp:

+    bool hasContendedAnnotation() { return has_annotation(_sun_misc_Contended); }

We don't use camel-case method names.

hotspot/src/share/vm/classfile/vmSymbols.hpp:

Please keep the indent aligned.

hotspot/src/share/vm/oops/fieldInfo.hpp:

I wonder if we have a spare access_flags bit somewhere we could use for is_contended.

jdk/src/share/classes/sun/misc/Contended.java:

Misses copyright header.

-- Chris

> 
> Notable differences against latest version:
>  - a little denser packing in some corner cases
>  - support @Contended for static fields
>  - moved @Contended to sun.misc (go and nag at c-i@ about this)
>  - bugfixes
> 
> Testing:
>  - hotspot/test/runtime/8003985/Test8003985 on Linux x86_64
>  - jprt, specjvm98 quick run
>  - jprt full cycle is underway, looking good
> 
> Thanks,
> Aleksey.



More information about the hotspot-dev mailing list