RFR (S): Shenandoah matrix update barriers should be conditional

Aleksey Shipilev shade at redhat.com
Thu Mar 9 16:30:06 UTC 2017


...otherwise we are contending on matrix updates a lot.

Case in point. Storing the object in different threads to different fields:

Benchmark          Mode  Cnt    Score   Error  Units

# -Xint
Plain.test_Object  avgt    5  152.070 ± 0.378  ns/op  # baseline
Plain.test_Object  avgt    5  129.156 ± 6.325  ns/op  # patched

# C1
Plain.test_Object  avgt    5   42.110 ± 1.008  ns/op  # baseline
Plain.test_Object  avgt    5    7.693 ± 0.031  ns/op  # patched

# C2
Plain.test_Object  avgt    5   41.746 ± 0.120  ns/op  # baseline
Plain.test_Object  avgt    5    6.792 ± 0.109  ns/op  # patched

Patch:
  http://cr.openjdk.java.net/~shade/shenandoah/matrix-update-cond/webrev.01/

Testing: hotspot_gc_shenandoah, jcstress -m quick with matrix enabled,
eyeballing assembly

Thanks,
-Aleksey

P.S. I am seriously considering to change bool* to char*, to avoid this C++ bool
mess.



More information about the shenandoah-dev mailing list