RFR (XS): 8165860: workgroup classes are missing volatile qualifiers for lock-free code

Thomas Schatzl thomas.schatzl at oracle.com
Tue Sep 20 08:43:00 UTC 2016


Hi Erik,

On Tue, 2016-09-20 at 10:28 +0200, Erik Österlund wrote:
> Hi Thomas,
> 
> On 2016-09-19 17:00, Thomas Schatzl wrote:
> > On Mon, 2016-09-19 at 15:50 +0200, Mikael Gerdin wrote:
> > > On 2016-09-19 15:48, Erik Österlund wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > Mikael Gerdin noticed a compiler workaround could be done in a
> > > > nicer-looking way.
> >    so just assigning the volatile to the temp is not sufficient to
> > make sure the compiler generates code to only read it once?
> The problem was more that solaris studio (only) complained that I was
> losing the volatile qualifier when I did it the straight forward way 
> (just assigning from the volatile).
> I tried again, and it doesn't seem to complain any longer. I must
> have done something slightly different the first time I tried this -
> sorry about that.
> 
> If you prefer just assign from the volatile, then here is a new
> webrev with that variant. I agree that probably looks better.
> 
> Full webrev: http://cr.openjdk.java.net/~eosterlund/8165860/webrev.02
> /
> Incremental webrev: 
> http://cr.openjdk.java.net/~eosterlund/8165860/webrev.01_02/
> 

Looks best =D.

I can sponsor it if you want.

Thomas




More information about the hotspot-gc-dev mailing list