RFR: 8184181: Use oopDesc::cas_set_mark() instead of raw CAS when accessing oop header

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Jul 14 22:35:40 UTC 2017


On 7/14/17 5:31 AM, Roman Kennke wrote:
> BiasedLocking and ObjectSynchronizer both use raw Atomic::cmpxchg_ptr()
> calls to CAS the header word of an oop. It's cleaner to use
> oopDesc::cas_set_mark() instead. Besides this being a cleanup, in the
> future (Shenandoah) we will also require GC barriers to do the right
> thing there.
>
> Webrev:
> http://cr.openjdk.java.net/~rkennke/8184181/webrev.00/
> <http://cr.openjdk.java.net/%7Erkennke/8184181/webrev.00/>

General comment
   - Please update copyright years before pushing as needed.

src/share/vm/runtime/biasedLocking.cpp
     No comments.

src/share/vm/runtime/synchronizer.cpp
     No comments.

Thumbs up!

Dan



>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8184181
>
> Ok?
>
> Tested by running hotspot_runtime tests.
>
> Roman
>



More information about the hotspot-runtime-dev mailing list