RFR (S): C2: Matrix update barrier math improvements
Roman Kennke
rkennke at redhat.com
Fri Mar 10 13:10:33 UTC 2017
Am 10.03.2017 um 12:36 schrieb Aleksey Shipilev:
> Hi,
>
> Turns out, we can do a few math transformations for computing matrix index, that
> benefits performance. See here:
> http://cr.openjdk.java.net/~shade/shenandoah/matrix-math/webrev.01/
>
> I think it only deserves to be in C2. Fighting C1 codegen to arrive to the same
> code is a waste of time, IMO. It seems to cut the matrix barrier costs almost in
> half:
>
> Benchmark Mode Cnt Score Error Units
>
> # Baseline (no barriers)
> Plain.test_Object avgt 15 4.683 ± 0.031 ns/op
> Plain.test_Object:cycles avgt 3 18.627 ± 1.466 #/op
> Plain.test_Object:instructions avgt 3 29.023 ± 0.059 #/op
>
> # Baseline (-XX:+ShenandoahMatrix)
> Plain.test_Object avgt 15 6.629 ± 0.054 ns/op
> Plain.test_Object:cycles avgt 3 26.392 ± 2.251 #/op
> Plain.test_Object:instructions avgt 3 45.047 ± 0.769 #/op
>
> # Patched (-XX:+ShenandoahMatrix)
> Plain.test_Object avgt 15 5.873 ± 0.038 ns/op
> Plain.test_Object:cycles avgt 3 23.373 ± 0.339 #/op
> Plain.test_Object:instructions avgt 3 41.096 ± 0.333 #/op
>
> Generated code before/after:
> http://cr.openjdk.java.net/~shade/shenandoah/matrix-math/baseline.perfasm
> http://cr.openjdk.java.net/~shade/shenandoah/matrix-math/optimized.perfasm
>
> Testing: hotspot_gc_shenandoah, jcstress -m quick (matrix update) is running
>
> Thanks,
> -Aleksey
>
Great stuff! Yes!
Roman
More information about the shenandoah-dev
mailing list