RFR (L): 8003868: fix shark for latest HotSpot and LLVM [Was: Re: RFR: Fix shark for latest Hotspot and LLVM]

Andrew Haley aph at redhat.com
Mon Nov 26 01:50:10 PST 2012

On 11/23/2012 05:14 PM, Roman Kennke wrote:

> Alright, I found another fairly grave bug that I would like to include a
> fix for: apparently, a 'fence' is not enough of a memory barrier for
> volatile putfield/getfield (duh). Which basically broke all of j.u.c.
> LLVM offers atomic loads and stores, which seem to be exactly what is
> needed for volatile field access. However, it does not provide helper
> functions for those in llvm::IRBuilder so I wrote my own. This should be
> the final patch for now (unless you find something else).
> http://cr.openjdk.java.net/~rkennke/shark/webrev.03/

I note that you've used llvm::SequentiallyConsistent for all the atomic
accesses.  This looks right to me, but if there's any doubt you could
ask Doug Lea.


More information about the hotspot-dev mailing list