33
34 /* @test
35 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
36 * of barrier flags
37 * @requires vm.gc.Shenandoah
38 * @library /test/lib
39 * @run driver TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation
40 */
41
42 import java.util.*;
43 import java.util.concurrent.*;
44
45 import jdk.test.lib.process.ProcessTools;
46 import jdk.test.lib.process.OutputAnalyzer;
47
48 public class TestSelectiveBarrierFlags {
49
50 public static void main(String[] args) throws Exception {
51 String[][] opts = {
52 new String[] { "ShenandoahLoadRefBarrier" },
53 new String[] { "ShenandoahSATBBarrier", "ShenandoahIUBarrier" },
54 new String[] { "ShenandoahCASBarrier" },
55 new String[] { "ShenandoahCloneBarrier" },
56 new String[] { "ShenandoahStackWatermarkBarrier" }
57 };
58
59 int size = 1;
60 for (String[] l : opts) {
61 size *= (l.length + 1);
62 }
63
64 ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
65
66 for (int c = 0; c < size; c++) {
67 int t = c;
68
69 List<String> conf = new ArrayList<>();
70 conf.addAll(Arrays.asList(args));
71 conf.add("-Xmx128m");
72 conf.add("-XX:+UnlockDiagnosticVMOptions");
73 conf.add("-XX:+UnlockExperimentalVMOptions");
|
33
34 /* @test
35 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
36 * of barrier flags
37 * @requires vm.gc.Shenandoah
38 * @library /test/lib
39 * @run driver TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation
40 */
41
42 import java.util.*;
43 import java.util.concurrent.*;
44
45 import jdk.test.lib.process.ProcessTools;
46 import jdk.test.lib.process.OutputAnalyzer;
47
48 public class TestSelectiveBarrierFlags {
49
50 public static void main(String[] args) throws Exception {
51 String[][] opts = {
52 new String[] { "ShenandoahLoadRefBarrier" },
53 new String[] { "ShenandoahSATBBarrier" },
54 new String[] { "ShenandoahCASBarrier" },
55 new String[] { "ShenandoahCloneBarrier" },
56 new String[] { "ShenandoahStackWatermarkBarrier" }
57 };
58
59 int size = 1;
60 for (String[] l : opts) {
61 size *= (l.length + 1);
62 }
63
64 ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
65
66 for (int c = 0; c < size; c++) {
67 int t = c;
68
69 List<String> conf = new ArrayList<>();
70 conf.addAll(Arrays.asList(args));
71 conf.add("-Xmx128m");
72 conf.add("-XX:+UnlockDiagnosticVMOptions");
73 conf.add("-XX:+UnlockExperimentalVMOptions");
|