< prev index next >

test/hotspot/jtreg/gc/shenandoah/options/TestSelectiveBarrierFlags.java

Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah


  26  *          of barrier flags
  27  * @key gc
  28  * @requires vm.gc.Shenandoah
  29  * @library /test/lib
  30  * @run main/othervm TestSelectiveBarrierFlags -Xint
  31  * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
  32  * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
  33  */
  34 
  35 import java.util.*;
  36 import java.util.concurrent.*;
  37 
  38 import jdk.test.lib.process.ProcessTools;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 
  41 public class TestSelectiveBarrierFlags {
  42 
  43     public static void main(String[] args) throws Exception {
  44         String[][] opts = {
  45                 new String[] { "ShenandoahKeepAliveBarrier" },
  46                 new String[] { "ShenandoahWriteBarrier" },
  47                 new String[] { "ShenandoahReadBarrier" },
  48                 // StoreValRead+SATB are actually compatible, but we need to protect against
  49                 // StorveValEnqueue+SATB. TODO: Make it better.
  50                 new String[] { "ShenandoahSATBBarrier", "ShenandoahStoreValReadBarrier", "ShenandoahStoreValEnqueueBarrier" },
  51                 new String[] { "ShenandoahCASBarrier" },
  52                 new String[] { "ShenandoahAcmpBarrier" },
  53                 new String[] { "ShenandoahCloneBarrier" },
  54         };
  55 
  56         int size = 1;
  57         for (String[] l : opts) {
  58             size *= (l.length + 1);
  59         }
  60 
  61         ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
  62 
  63         for (int c = 0; c < size; c++) {
  64             int t = c;
  65 
  66             List<String> conf = new ArrayList<>();
  67             conf.addAll(Arrays.asList(args));
  68             conf.add("-Xmx128m");
  69             conf.add("-XX:+UnlockDiagnosticVMOptions");
  70             conf.add("-XX:+UnlockExperimentalVMOptions");
  71             conf.add("-XX:+UseShenandoahGC");
  72             conf.add("-XX:ShenandoahGCHeuristics=passive");




  26  *          of barrier flags
  27  * @key gc
  28  * @requires vm.gc.Shenandoah
  29  * @library /test/lib
  30  * @run main/othervm TestSelectiveBarrierFlags -Xint
  31  * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
  32  * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
  33  */
  34 
  35 import java.util.*;
  36 import java.util.concurrent.*;
  37 
  38 import jdk.test.lib.process.ProcessTools;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 
  41 public class TestSelectiveBarrierFlags {
  42 
  43     public static void main(String[] args) throws Exception {
  44         String[][] opts = {
  45                 new String[] { "ShenandoahKeepAliveBarrier" },
  46                 new String[] { "ShenandoahLoadRefBarrier" },
  47                 new String[] { "ShenandoahSATBBarrier", "ShenandoahStoreValEnqueueBarrier" },



  48                 new String[] { "ShenandoahCASBarrier" },

  49                 new String[] { "ShenandoahCloneBarrier" },
  50         };
  51 
  52         int size = 1;
  53         for (String[] l : opts) {
  54             size *= (l.length + 1);
  55         }
  56 
  57         ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
  58 
  59         for (int c = 0; c < size; c++) {
  60             int t = c;
  61 
  62             List<String> conf = new ArrayList<>();
  63             conf.addAll(Arrays.asList(args));
  64             conf.add("-Xmx128m");
  65             conf.add("-XX:+UnlockDiagnosticVMOptions");
  66             conf.add("-XX:+UnlockExperimentalVMOptions");
  67             conf.add("-XX:+UseShenandoahGC");
  68             conf.add("-XX:ShenandoahGCHeuristics=passive");


< prev index next >