RFR: Fix TestSelectiveBarrierFlags

Roman Kennke rkennke at redhat.com
Mon Jul 16 15:24:31 UTC 2018


In TestSelectiveBarrierFlags we test the combination
+ShenandoahSATBBarrier with +ShenandoahStoreValEnqueueBarrier. This
combination messes up aarch64 membar eliason checks leading to
crashes/asserts, and it's not a combination that occurs in the real
world. They are exclusive, we either use SATB *or* IU barriers, but
never both. Unfortunately, +ShenandoahStoreValEnqueueBarrier is also
exclusive to +ShenandoahStoreValReadBarrier, but
+ShenandoahStoreValReadBarrier usually comes with
+ShenandoahSATBBarrier. The following change fixes the failing test, but
removes the (valid) combination +ShenandoahSATBBarrier
+ShenandoahStoreValReadBarrier from the test. It seems like the lesser
evil for now, but I'm open to suggestions how to test cross-exclusive:

+ShenandoahStoreValReadBarrier +ShenandoahSATBBarrier
vs
+ShenandoahStoreValEnqueueBarrier

diff -r 1b2c7b2dd108
test/hotspot/jtreg/gc/shenandoah/TestSelectiveBarrierFlags.java
--- a/test/hotspot/jtreg/gc/shenandoah/TestSelectiveBarrierFlags.java
Thu Jul 12 15:42:17 2018 +0200
+++ b/test/hotspot/jtreg/gc/shenandoah/TestSelectiveBarrierFlags.java
Mon Jul 16 11:19:20 2018 -0400
@@ -39,11 +39,10 @@

     public static void main(String[] args) throws Exception {
         String[][] opts = {
-            new String[]{ "ShenandoahSATBBarrier" },
             new String[]{ "ShenandoahKeepAliveBarrier" },
             new String[]{ "ShenandoahWriteBarrier" },
             new String[]{ "ShenandoahReadBarrier" },
-            new String[]{ "ShenandoahStoreValReadBarrier",
"ShenandoahStoreValEnqueueBarrier" },
+            new String[]{ "ShenandoahSATBBarrier",
"ShenandoahStoreValReadBarrier", "ShenandoahStoreValEnqueueBarrier" },
             new String[]{ "ShenandoahCASBarrier" },
             new String[]{ "ShenandoahAcmpBarrier" },
             new String[]{ "ShenandoahCloneBarrier" },


Testing: TestSelectiveBarrierFlags on aarch64 now passes

Roman



More information about the shenandoah-dev mailing list