[jmm-dev] Update to description of JEP 193: Enhanced Volatiles

Paul Sandoz paul.sandoz at oracle.com
Thu Oct 30 17:09:04 UTC 2014


[switching from jmm-dev to valhall-dev]

On Oct 30, 2014, at 5:23 PM, "David M. Lloyd" <david.lloyd at redhat.com> wrote:

> On 10/30/2014 10:53 AM, Paul Sandoz wrote:
>> 
>> On Oct 30, 2014, at 4:47 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>> 
>>> 
>>> On 10/30/2014 03:02 PM, Paul Sandoz wrote:
>>>> Hi,
>>>> 
>>>> I have, with the help of Brian, Doug and John, updated the description of JEP 193: Enhanced Volatiles to reflect our current thinking based on:
>>>> 
>>>> - the prototype implementation in valhalla;
>>>> - performance measurements of that implementation; and
>>>> - investigations related to signature polymorphic methods and invokedynamic.
>>>> 
>>>> Thanks,
>>>> Paul.
>>> 
>>> I seems that the changes are not propagated to the JEP yet,
>>> but there are available throught the corresponding bug:
>>>  https://bugs.openjdk.java.net/browse/JDK-8046183
>>> 
>> 
>> Doh! thanks, i forgot to send the link out,
> 
> Wow, that's even *more* convoluted.  Are we *certain* that we are actually improving on the original proposal here?  It seems to me like everyone can't jump on the *handle bandwagon fast enough, even though it seems to be objectively more complex from concept (that human engineers want to understand) to API (the previously proposed API was very much cleaner and didn't rely on cross-your-fingers magic to make inefficient things become efficient) to implementation (to this day, relatively few people outside of Oracle even have a glimmer of understanding as to the rules and behaviors of these things).
> 

The original JEP did not talk much about how javac would translate a "floating" invocation on a type specific interface to byte code. Our thinking was to use the same mechanisms as in the updated JEP and the "cross-your-fingers magic " you refer to, which on investigation has actually proven to be quite reliable (the goats are safe!).


> Are we *certain* this is an improvement?
> 

Yes, it's an improvement on Unsafe and i think we can incrementally improve it over time without needing to introduce a special syntax.

Paul.


More information about the valhalla-dev mailing list