RFR: AArch64: 8179954: AArch64: C1 and C2 volatile accesses are not sequentially consistent (original) (raw)

White, Derek Derek.White at cavium.com
Wed May 10 16:42:37 UTC 2017


So good news - you made getstatic 5x faster. Bad news - only in the interpreter.

So this one goes out to all the static initializers!

Actual code review question: In templateTable_aarch64.cpp: Line 2411: We tbz on flags. Line 2423: We extract into flags. Line 2547: We tbz on flags. - Is the volatile bit still in flags?

Thanks!

-----Original Message----- From: Andrew Haley [mailto:aph at redhat.com] Sent: Wednesday, May 10, 2017 10:19 AM To: White, Derek <Derek.White at cavium.com>; Aleksey Shipilev <shade at redhat.com>; hotspot-dev Source Developers <hotspot-dev at openjdk.java.net> Subject: Re: RFR: AArch64: 8179954: AArch64: C1 and C2 volatile accesses are not sequentially consistent

So you were right. Dammit. :-)

This test:

@State(Scope.Benchmark)
public static class BenchmarkState {
    static int nn = 99;
}
@Benchmark
public int testMethod(BenchmarkState state) {
    return state.nn;
}

Interpreter-only, before my patch:

Benchmark Mode Cnt Score Error Units MyBenchmark.testMethod avgt 5 92.938 ? 0.870 ns/op

After my patch, it's slower:

Run complete. Total time: 00:00:07

Benchmark Mode Cnt Score Error Units MyBenchmark.testMethod avgt 5 94.518 ? 0.562 ns/op

But if I insert conditional branches around the fences as you suggest, the result is much better:

Benchmark Mode Cnt Score Error Units MyBenchmark.testMethod avgt 25 83.825 ? 0.161 ns/op

New patch at http://cr.openjdk.java.net/~aph/8179954-2/

OK?

Andrew.



More information about the hotspot-dev mailing list