22 */
23
24 /* @test
25 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
26 * of barrier flags
27 * @library /test/lib
28 * @run main/othervm TestSelectiveBarrierFlags -Xint
29 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
30 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
31 */
32
33 import java.util.*;
34 import java.util.concurrent.*;
35 import jdk.test.lib.process.ProcessTools;
36 import jdk.test.lib.process.OutputAnalyzer;
37
38 public class TestSelectiveBarrierFlags {
39
40 public static void main(String[] args) throws Exception {
41 String[][] opts = {
42 new String[]{ "ShenandoahSATBBarrier", "ShenandoahConditionalSATBBarrier" },
43 new String[]{ "ShenandoahKeepAliveBarrier" },
44 new String[]{ "ShenandoahWriteBarrier" },
45 new String[]{ "ShenandoahReadBarrier" },
46 new String[]{ "ShenandoahStoreValWriteBarrier", "ShenandoahStoreValReadBarrier", "ShenandoahStoreValEnqueueBarrier" },
47 new String[]{ "ShenandoahCASBarrier" },
48 new String[]{ "ShenandoahAcmpBarrier" },
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:+UseShenandoahGC");
66 conf.add("-XX:+UnlockDiagnosticVMOptions");
|
22 */
23
24 /* @test
25 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
26 * of barrier flags
27 * @library /test/lib
28 * @run main/othervm TestSelectiveBarrierFlags -Xint
29 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
30 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
31 */
32
33 import java.util.*;
34 import java.util.concurrent.*;
35 import jdk.test.lib.process.ProcessTools;
36 import jdk.test.lib.process.OutputAnalyzer;
37
38 public class TestSelectiveBarrierFlags {
39
40 public static void main(String[] args) throws Exception {
41 String[][] opts = {
42 new String[]{ "ShenandoahSATBBarrier" },
43 new String[]{ "ShenandoahKeepAliveBarrier" },
44 new String[]{ "ShenandoahWriteBarrier" },
45 new String[]{ "ShenandoahReadBarrier" },
46 new String[]{ "ShenandoahStoreValReadBarrier", "ShenandoahStoreValEnqueueBarrier" },
47 new String[]{ "ShenandoahCASBarrier" },
48 new String[]{ "ShenandoahAcmpBarrier" },
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:+UseShenandoahGC");
66 conf.add("-XX:+UnlockDiagnosticVMOptions");
|