for review: 8236522: "always atomic" modifier for inline classes to enforce atomicity

John Rose john.r.rose at oracle.com
Tue Dec 24 21:36:34 UTC 2019


The webrev is updated in place, with an improved unit test
for detecting tearing and its absence.

This uncovered a missing StoreStore barrier in C2, which I also fixed.

BTW, the funny pattern match logic for class names is not just for
this change set.  We will want the same pattern match for other
at hoc diagnostics, such as flagging surprising synchronization.

— John

On Dec 24, 2019, at 12:05 AM, John Rose <john.r.rose at oracle.com> wrote:
> 
> Define a new modifier which enforces atomicity of all instances (in the heap) of the given inline class. 
> 
> Working title "__AlwaysAtomic". Suggested final "alwaysatomic" or just "atomic". 
> 
> Represented in classfile using currently free modifier bit 0x0040 = ACC_VOLATILE.
> 
> https://bugs.openjdk.java.net/browse/JDK-8236522
> http://cr.openjdk.java.net/~jrose/jvm/atomic-8236522
> 



More information about the valhalla-dev mailing list