RFR (XS): CR 8004330: Add missing Unsafe entry points for addAndGet() family

David Holmes david.holmes at oracle.com
Wed Jan 9 10:55:18 UTC 2013


Not sure where this is now but FYI you needed two CRs for this: one for 
hotspot and one for the JDK. They have different target versions (hs25 
vs 8) and depending on the path you use to integrate could end up in 
different builds - hence distinct CRs for accurate tracking purposes.

I have a concern that the Long versions of these methods may be used 
directly without there being any check for supports_cx8


On 21/12/2012 5:03 AM, Aleksey Shipilev wrote:
> Hi,
> Sorry for cross-list posting, but this change affects both HS and JDK.
> This simple change is missing from recently committed CR 7023898. While
> the VM support is there in Hotspot, no methods are exposed in Unsafe to
> actually make use of those intrinsics. This is the webrev fixing that:
>    http://cr.openjdk.java.net/~shade/8004330/webrev.00/
> It turns out the getAndSet intrinsics HotSpot are overloaded, which had
> deluged both Doug and me in the previous patch. These namings are
> inconsistent with other Unsafe intrinsic naming convention, so this
> change fixes that as well.
> Testing:
>    - Built and tested in Linux x86_64
>    - java-concurrency-torture [1] atomicity tests are passed for
> AtomicIntegerV8 [2] and AtomicLongV8 [3] making use of those intrinsics
> on Linux x86_64
>    - running the java-concurrency-torture tests "-XX:+PrintInlining |
> grep Unsafe" tells all intrinsics have been successfully inlined
>    - no other testing is expected for this trivial change.
> I would need a sponsor to push this. Thanks for your patience and reviews!
> Contributors:
>    - dl: original patch, testing
>    - shade: due diligence, messing with reviews, tests, and rebuilds
> -Aleksey.
> [1] https://github.com/shipilev/java-concurrency-torture/
> [2]
> https://github.com/shipilev/java-concurrency-torture/blob/master/src/main/java/org/openjdk/concurrent/torture/tests/atomics/integer/AtomicIntegerV8PairwiseTests.java
> [3]
> https://github.com/shipilev/java-concurrency-torture/blob/master/src/main/java/org/openjdk/concurrent/torture/tests/atomics/longs/AtomicLongV8PairwiseTests.java

More information about the core-libs-dev mailing list