[aarch64-port-dev ] Proposed patch for C2 volatile generation (resent)

Andrew Dinn adinn at redhat.com
Wed Apr 15 14:51:22 UTC 2015


On 15/04/15 10:37, Edward Nevill wrote:
> On Tue, 2015-04-14 at 16:45 +0100, Andrew Dinn wrote:
> 
>> I am still waiting for the jcstress tests to complete. When they do I
>> will revert all my changes and see whether I still get crashes.
>> Meanwhile, Ed, could you try running jcstress with the attached patch to
>> see if the problem is my setup?
> 
> OK. I have run it on another of our partners A57 hw with -XX:-TieredCompilation.
> 
> There were no failures. There was 1 VM error
> 
> Exception in thread "main" java.lang.NoSuchMethodError: sun.misc.Unsafe.fieldOffset(Ljava/lang/reflect/Field;)I
> 
> But I don't believe this is anything to do with the patch.
> 
> Results and log at
> 
> http://openjdk.linaro.org/jcstress/a57

Thanks Ed. It looks like the patch is ok.

I think the problem is my old hardware (or possibly OS). I am seeing
occasional VM crashes under resolve_virtual_call even without my patch.
I believe this is probably due to some hw problem to do with
icache/dcache syncing.

Also, I think we can disregard the VM crash for UnsafeBusyLoopTest. I
think this is happening because jdk9 has (very recently) hidden
sun.misc.Unsafe from everything not included in java.base. The jcstress
test harness does not add the jcstress jar to the bootstrap path for the
forked JVM . This appears to be so even if you add it on the command
line to the bootstrap path for the main JVM when you run jcstress.

java -jar jcstress.jar --help suggests you can use -jvmArgs to add
options for the forked JVM which might resolve this.

So, it seems the latest patch is looking good as a fix to make volatile
reads/writes use ldar<x>/stlr<x>. Andrew Haley, what else do we need to
do in order to proceed to commit?

Meanwhile, I'll continue eyeballing the output of ConcurrentHashMap to
see if I can see any other signature membar sequences I can detect and
safely elide dmb generation for (e.g. the dmb ish; dmb ishst pair I
noticed which seem to relate to inlined new operations).

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Matt Parson (USA), Charlie Peters
(USA), Michael O'Neill (Ireland)


More information about the aarch64-port-dev mailing list