26 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
27 * of barrier flags
28 * @key gc
29 * @requires vm.gc.Shenandoah & !vm.graal.enabled
30 * @library /test/lib
31 * @run main/othervm TestSelectiveBarrierFlags -Xint
32 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
33 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
34 */
35
36 import java.util.*;
37 import java.util.concurrent.*;
38
39 import jdk.test.lib.process.ProcessTools;
40 import jdk.test.lib.process.OutputAnalyzer;
41
42 public class TestSelectiveBarrierFlags {
43
44 public static void main(String[] args) throws Exception {
45 String[][] opts = {
46 new String[] { "ShenandoahKeepAliveBarrier" },
47 new String[] { "ShenandoahLoadRefBarrier" },
48 new String[] { "ShenandoahSATBBarrier", "ShenandoahStoreValEnqueueBarrier" },
49 new String[] { "ShenandoahCASBarrier" },
50 new String[] { "ShenandoahCloneBarrier" },
51 };
52
53 int size = 1;
54 for (String[] l : opts) {
55 size *= (l.length + 1);
56 }
57
58 ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
59
60 for (int c = 0; c < size; c++) {
61 int t = c;
62
63 List<String> conf = new ArrayList<>();
64 conf.addAll(Arrays.asList(args));
65 conf.add("-Xmx128m");
66 conf.add("-XX:+UnlockDiagnosticVMOptions");
|
26 * @summary Test selective barrier enabling works, by aggressively compiling HelloWorld with combinations
27 * of barrier flags
28 * @key gc
29 * @requires vm.gc.Shenandoah & !vm.graal.enabled
30 * @library /test/lib
31 * @run main/othervm TestSelectiveBarrierFlags -Xint
32 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
33 * @run main/othervm TestSelectiveBarrierFlags -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+ShenandoahVerifyOptoBarriers
34 */
35
36 import java.util.*;
37 import java.util.concurrent.*;
38
39 import jdk.test.lib.process.ProcessTools;
40 import jdk.test.lib.process.OutputAnalyzer;
41
42 public class TestSelectiveBarrierFlags {
43
44 public static void main(String[] args) throws Exception {
45 String[][] opts = {
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");
|