< prev index next >

test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java

Print this page

        

@@ -37,11 +37,13 @@
  *                       TestUnsafeVolatileGAS}
  * and <testtype> in {G1,
  *                    CMS,
  *                    CMSCondMark,
  *                    Serial,
- *                    Parallel}
+ *                    Parallel,
+ *                    Shenandoah,
+ *                    ShenandoahIU}
  */
 
 
 package compiler.c2.aarch64;
 

@@ -98,10 +100,22 @@
             argcount = 10;
             procArgs = new String[argcount];
             procArgs[argcount - 3] = "-XX:+UseConcMarkSweepGC";
             procArgs[argcount - 2] = "-XX:+UseCondCardMark";
             break;
+        case "Shenandoah":
+            argcount = 8;
+            procArgs = new String[argcount];
+            procArgs[argcount - 2] = "-XX:+UseShenandoahGC";
+            break;        
+        case "ShenandoahIU":
+            argcount = 11;
+            procArgs = new String[argcount];
+            procArgs[argcount - 4] = "-XX:+UnlockExperimentalVMOptions";
+            procArgs[argcount - 3] = "-XX:+UseShenandoahGC";
+            procArgs[argcount - 2] = "-XX:ShenandoahGCMode=iu";
+            break;
         default:
             throw new RuntimeException("unexpected test type " + testType);
         }
 
         // fill in arguments common to all cases

@@ -353,10 +367,21 @@
                     "strb",
                     "membar_volatile \\(elided\\)",
                     "ret"
                 };
                 break;
+            case "Shenandoah":
+            case "ShenandoahIU":
+                 // Shenandoah generates normal object graphs for
+                 // volatile stores
+                matches = new String[] {
+                    "membar_release (elided)",
+                    "stlrw",
+                    "membar_volatile (elided)",
+                    "ret"
+                };
+                break;
             }
         } else {
             switch (testType) {
             default:
                 // this is the basic sequence of instructions

@@ -416,10 +441,24 @@
                     "membar_volatile",
                     "dmb ish",
                     "ret"
                 };
                 break;
+
+            case "Shenandoah":
+            case "ShenandoahIU":
+                 // Shenandoah generates normal object graphs for
+                 // volatile stores
+                matches = new String[] {
+                    "membar_release",
+                    "dmb ish",
+                    "strw",
+                    "membar_volatile",
+                    "dmb ish",
+                    "ret"
+                };
+                break;
             }
         }
 
         checkCompile(iter, "testObj", matches, output, true);
     }

@@ -518,10 +557,21 @@
                     "strb",
                     "membar_acquire \\(elided\\)",
                     "ret"
                 };
                 break;
+            case "Shenandoah":
+            case "ShenandoahIU":
+                // For volatile CAS, Shenanodoah generates normal
+                // graphs with a shenandoah-specific cmpxchg
+                matches = new String[] {
+                    "membar_release (elided)",
+                    "cmpxchgw_acq_shenandoah",
+                    "membar_acquire (elided)",
+                    "ret"
+                };
+                break;
             }
         } else {
             switch (testType) {
             default:
                 // this is the basic sequence of instructions

@@ -762,10 +812,23 @@
                     "membar_acquire",
                     "dmb ish",
                     "ret"
                 };
                 break;
+            case "Shenandoah":
+            case "ShenandoahIU":
+                // For volatile CAS, Shenanodoah generates normal
+                // graphs with a shenandoah-specific cmpxchg
+                matches = new String[] {
+                    "membar_release",
+                    "dmb ish",
+                    "cmpxchgw_shenandoah",
+                    "membar_acquire",
+                    "dmb ish",
+                    "ret"
+                };
+                break;
             }
         }
 
         checkCompile(iter, "testObj", matches, output, true);
     }
< prev index next >