--- old/test/TEST.ROOT 2017-05-26 16:34:09.218927993 -0700 +++ new/test/TEST.ROOT 2017-05-26 16:34:09.086928000 -0700 @@ -35,7 +35,7 @@ # to determine additional characteristics of the system for use with the @requires tag. # Note: compiled bootlibs code will be located in the folder 'bootClasses' requires.extraPropDefns = ../../test/jtreg-ext/requires/VMProps.java [../../closed/test/jtreg-ext/requires/VMPropsExt.java] -requires.extraPropDefns.bootlibs = ../../test/lib/sun +requires.extraPropDefns.bootlibs = ../../test/lib/sun ../../test/lib/jdk/test/lib/Platform.java requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:bootClasses requires.properties= \ sun.arch.data.model \ @@ -48,7 +48,9 @@ vm.jvmci \ vm.emulatedClient \ vm.cpu.features \ - vm.debug + vm.debug \ + vm.rtm.cpu \ + vm.rtm.os # Tests using jtreg 4.2 b07 features requiredVersion=4.2 b07 --- old/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java 2017-05-26 16:34:09.618927972 -0700 +++ new/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java 2017-05-26 16:34:09.486927979 -0700 @@ -32,8 +32,8 @@ /** * Base for all RTM-related CLI tests. */ -public abstract class RTMGenericCommandLineOptionTest - extends CommandLineOptionTest { +public abstract class RTMGenericCommandLineOptionTest { + protected static final String RTM_INSTR_ERROR = "RTM instructions are not available on this CPU"; protected static final String RTM_UNSUPPORTED_VM_ERROR @@ -66,17 +66,15 @@ * Test constructed using this ctor will be started on any cpu regardless * it's architecture and supported/unsupported features. * - * @param predicate predicate responsible for test's preconditions check * @param optionName name of option to be tested * @param isBoolean {@code true} if option is binary * @param isExperimental {@code true} if option is experimental * @param defaultValue default value of tested option * @param optionValues different option values */ - public RTMGenericCommandLineOptionTest(BooleanSupplier predicate, + public RTMGenericCommandLineOptionTest( String optionName, boolean isBoolean, boolean isExperimental, String defaultValue, String... optionValues) { - super(predicate); this.optionName = optionName; this.isExperimental = isExperimental; this.isBoolean = isBoolean; @@ -88,7 +86,6 @@ getExperimentalOptionErrorMessage(optionName); } - @Override public void runTestCases() throws Throwable { if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) { if (Platform.isServer()) { --- old/test/compiler/rtm/cli/RTMLockingAwareTest.java 2017-05-26 16:34:10.034927950 -0700 +++ new/test/compiler/rtm/cli/RTMLockingAwareTest.java 2017-05-26 16:34:09.898927957 -0700 @@ -23,12 +23,8 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.LinkedList; import java.util.List; @@ -66,8 +62,7 @@ boolean isExperimental, String defaultValue, String[] correctValues, String[] incorrectValues, String warningMessage) { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()), - optionName, isBoolean, isExperimental, defaultValue); + super(optionName, isBoolean, isExperimental, defaultValue); this.correctValues = correctValues; this.incorrectValues = incorrectValues; this.warningMessage = warningMessage; --- old/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java 2017-05-26 16:34:10.446927928 -0700 +++ new/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java 2017-05-26 16:34:10.318927935 -0700 @@ -27,15 +27,12 @@ import jdk.test.lib.Platform; import jdk.test.lib.cli.CommandLineOptionTest; -import java.util.function.BooleanSupplier; - public abstract class TestPrintPreciseRTMLockingStatisticsBase extends RTMGenericCommandLineOptionTest { protected static final String DEFAULT_VALUE = "false"; - protected TestPrintPreciseRTMLockingStatisticsBase( - BooleanSupplier predicate) { - super(predicate, "PrintPreciseRTMLockingStatistics", true, false, + protected TestPrintPreciseRTMLockingStatisticsBase() { + super("PrintPreciseRTMLockingStatistics", true, false, TestPrintPreciseRTMLockingStatisticsBase.DEFAULT_VALUE); } --- old/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java 2017-05-26 16:34:10.862927906 -0700 +++ new/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java 2017-05-26 16:34:10.730927913 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,17 +40,10 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; public class TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig extends TestPrintPreciseRTMLockingStatisticsBase { - private TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } @Override protected void verifyOptionValues() throws Throwable { @@ -87,6 +80,6 @@ public static void main(String args[]) throws Throwable { new TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig() - .test(); + .runTestCases(); } } --- old/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java 2017-05-26 16:34:11.278927884 -0700 +++ new/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java 2017-05-26 16:34:11.142927892 -0700 @@ -29,7 +29,8 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os) + * @build sun.hotspot.WhiteBox * @build compiler.rtm.cli.TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,21 +41,11 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; - public class TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig extends TestPrintPreciseRTMLockingStatisticsBase { - private TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig() { - super(new NotPredicate( - new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()))); - } public static void main(String args[]) throws Throwable { new TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig() - .test(); + .runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java 2017-05-26 16:34:11.694927863 -0700 +++ new/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java 2017-05-26 16:34:11.566927869 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -55,6 +55,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMAbortRatioOptionOnSupportedConfig().test(); + new TestRTMAbortRatioOptionOnSupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java 2017-05-26 16:34:12.106927841 -0700 +++ new/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java 2017-05-26 16:34:11.974927848 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,25 +40,17 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; - public class TestRTMAbortRatioOptionOnUnsupportedConfig extends RTMGenericCommandLineOptionTest { private static final String DEFAULT_VALUE = "50"; private TestRTMAbortRatioOptionOnUnsupportedConfig() { - super(new NotPredicate( - new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())), - "RTMAbortRatio", false, true, + super("RTMAbortRatio", false, true, TestRTMAbortRatioOptionOnUnsupportedConfig.DEFAULT_VALUE, - "0", "10", "100", "200"); + "0", "10", "100"); } public static void main(String args[]) throws Throwable { - new TestRTMAbortRatioOptionOnUnsupportedConfig().test(); + new TestRTMAbortRatioOptionOnUnsupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java 2017-05-26 16:34:12.510927820 -0700 +++ new/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java 2017-05-26 16:34:12.378927827 -0700 @@ -39,12 +39,12 @@ private static final String DEFAULT_VALUE = "1000"; private TestRTMAbortThresholdOption() { - super(Boolean.TRUE::booleanValue, "RTMAbortThreshold", false, true, + super("RTMAbortThreshold", false, true, TestRTMAbortThresholdOption.DEFAULT_VALUE, "0", "42", "100", "10000"); } public static void main(String args[]) throws Throwable { - new TestRTMAbortThresholdOption().test(); + new TestRTMAbortThresholdOption().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java 2017-05-26 16:34:12.922927798 -0700 +++ new/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java 2017-05-26 16:34:12.786927805 -0700 @@ -39,11 +39,11 @@ private static final String DEFAULT_VALUE = "0"; private TestRTMLockingCalculationDelayOption() { - super(Boolean.TRUE::booleanValue, "RTMLockingCalculationDelay", false, + super("RTMLockingCalculationDelay", false, true, TestRTMLockingCalculationDelayOption.DEFAULT_VALUE); } public static void main(String agrs[]) throws Throwable { - new TestRTMLockingCalculationDelayOption().test(); + new TestRTMLockingCalculationDelayOption().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java 2017-05-26 16:34:13.326927777 -0700 +++ new/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java 2017-05-26 16:34:13.194927784 -0700 @@ -39,11 +39,11 @@ private static final String DEFAULT_VALUE = "10000"; private TestRTMLockingThresholdOption() { - super(Boolean.TRUE::booleanValue, "RTMLockingThreshold", false, true, + super("RTMLockingThreshold", false, true, TestRTMLockingThresholdOption.DEFAULT_VALUE); } public static void main(String args[]) throws Throwable { - new TestRTMLockingThresholdOption().test(); + new TestRTMLockingThresholdOption().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMRetryCountOption.java 2017-05-26 16:34:13.730927756 -0700 +++ new/test/compiler/rtm/cli/TestRTMRetryCountOption.java 2017-05-26 16:34:13.598927763 -0700 @@ -38,12 +38,12 @@ private static final String DEFAULT_VALUE = "5"; private TestRTMRetryCountOption() { - super(Boolean.TRUE::booleanValue, "RTMRetryCount", false, false, + super("RTMRetryCount", false, false, TestRTMRetryCountOption.DEFAULT_VALUE, "0", "10", "100", "1000"); } public static void main(String args[]) throws Throwable { - new TestRTMRetryCountOption().test(); + new TestRTMRetryCountOption().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java 2017-05-26 16:34:14.130927735 -0700 +++ new/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java 2017-05-26 16:34:14.002927741 -0700 @@ -39,12 +39,12 @@ private static final String DEFAULT_VALUE = "100"; private TestRTMSpinLoopCountOption() { - super(Boolean.TRUE::booleanValue, "RTMSpinLoopCount", false, true, + super("RTMSpinLoopCount", false, true, TestRTMSpinLoopCountOption.DEFAULT_VALUE, "0", "10", "42", "1000"); } public static void main(String args[]) throws Throwable { - new TestRTMSpinLoopCountOption().test(); + new TestRTMSpinLoopCountOption().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java 2017-05-26 16:34:14.538927713 -0700 +++ new/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java 2017-05-26 16:34:14.406927720 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -55,6 +55,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMTotalCountIncrRateOptionOnSupportedConfig().test(); + new TestRTMTotalCountIncrRateOptionOnSupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java 2017-05-26 16:34:14.950927691 -0700 +++ new/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java 2017-05-26 16:34:14.818927698 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,26 +40,18 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; - public class TestRTMTotalCountIncrRateOptionOnUnsupportedConfig extends RTMGenericCommandLineOptionTest { private static final String DEFAULT_VALUE = "64"; private TestRTMTotalCountIncrRateOptionOnUnsupportedConfig() { - super(new NotPredicate( - new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())), - "RTMTotalCountIncrRate", false, true, + super("RTMTotalCountIncrRate", false, true, TestRTMTotalCountIncrRateOptionOnUnsupportedConfig .DEFAULT_VALUE, - "-1", "0", "42", "128"); + "1", "42", "128"); } public static void main(String args[]) throws Throwable { - new TestRTMTotalCountIncrRateOptionOnUnsupportedConfig().test(); + new TestRTMTotalCountIncrRateOptionOnUnsupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java 2017-05-26 16:34:15.358927670 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java 2017-05-26 16:34:15.222927677 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,22 +40,12 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -public class TestUseRTMDeoptOptionOnSupportedConfig - extends CommandLineOptionTest { +public class TestUseRTMDeoptOptionOnSupportedConfig { private static final String DEFAULT_VALUE = "false"; - private TestUseRTMDeoptOptionOnSupportedConfig() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override public void runTestCases() throws Throwable { String shouldPassMessage = " JVM should startup with option '" + "-XX:+UseRTMDeopt' without any warnings"; @@ -96,6 +86,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMDeoptOptionOnSupportedConfig().test(); + new TestUseRTMDeoptOptionOnSupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java 2017-05-26 16:34:15.762927649 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java 2017-05-26 16:34:15.634927656 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,21 +40,14 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; public class TestUseRTMDeoptOptionOnUnsupportedConfig extends RTMGenericCommandLineOptionTest { private static final String DEFAULT_VALUE = "false"; private TestUseRTMDeoptOptionOnUnsupportedConfig() { - super(new NotPredicate( - new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())), - "UseRTMDeopt", true, false, + super("UseRTMDeopt", true, false, TestUseRTMDeoptOptionOnUnsupportedConfig.DEFAULT_VALUE, "true"); } @@ -77,6 +70,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMDeoptOptionOnUnsupportedConfig().test(); + new TestUseRTMDeoptOptionOnUnsupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java 2017-05-26 16:34:16.174927627 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java 2017-05-26 16:34:16.042927634 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,22 +40,12 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -public class TestUseRTMForStackLocksOptionOnSupportedConfig - extends CommandLineOptionTest { +public class TestUseRTMForStackLocksOptionOnSupportedConfig { private static final String DEFAULT_VALUE = "false"; - private TestUseRTMForStackLocksOptionOnSupportedConfig() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override public void runTestCases() throws Throwable { String errorMessage = CommandLineOptionTest.getExperimentalOptionErrorMessage( @@ -127,6 +117,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMForStackLocksOptionOnSupportedConfig().test(); + new TestUseRTMForStackLocksOptionOnSupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java 2017-05-26 16:34:16.582927606 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java 2017-05-26 16:34:16.450927613 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,22 +40,15 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; public class TestUseRTMForStackLocksOptionOnUnsupportedConfig extends RTMGenericCommandLineOptionTest { private static final String DEFAULT_VALUE = "false"; private TestUseRTMForStackLocksOptionOnUnsupportedConfig() { - super(new NotPredicate( - new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())), - "UseRTMForStackLocks", true, true, + super("UseRTMForStackLocks", true, true, TestUseRTMForStackLocksOptionOnUnsupportedConfig.DEFAULT_VALUE, "true"); } @@ -111,6 +104,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMForStackLocksOptionOnUnsupportedConfig().test(); + new TestUseRTMForStackLocksOptionOnUnsupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java 2017-05-26 16:34:16.994927584 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java 2017-05-26 16:34:16.858927591 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,22 +40,12 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -public class TestUseRTMLockingOptionOnSupportedConfig - extends CommandLineOptionTest { +public class TestUseRTMLockingOptionOnSupportedConfig { private static final String DEFAULT_VALUE = "false"; - private TestUseRTMLockingOptionOnSupportedConfig() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override public void runTestCases() throws Throwable { String unrecongnizedOption = CommandLineOptionTest.getUnrecognizedOptionErrorMessage( @@ -104,6 +94,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMLockingOptionOnSupportedConfig().test(); + new TestUseRTMLockingOptionOnSupportedConfig().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java 2017-05-26 16:34:17.410927562 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java 2017-05-26 16:34:17.278927569 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires (!vm.rtm.cpu) & (vm.flavor == "server" & !vm.emulatedClient) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,24 +40,13 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.Platform; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; -public class TestUseRTMLockingOptionOnUnsupportedCPU - extends CommandLineOptionTest { +public class TestUseRTMLockingOptionOnUnsupportedCPU { private static final String DEFAULT_VALUE = "false"; - private TestUseRTMLockingOptionOnUnsupportedCPU() { - super(new AndPredicate(new NotPredicate(new SupportedCPU()), - new SupportedVM())); - } - - @Override public void runTestCases() throws Throwable { String unrecongnizedOption = CommandLineOptionTest.getUnrecognizedOptionErrorMessage( @@ -107,6 +96,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMLockingOptionOnUnsupportedCPU().test(); + new TestUseRTMLockingOptionOnUnsupportedCPU().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java 2017-05-26 16:34:17.830927540 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java 2017-05-26 16:34:17.694927547 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.rtm.cpu & !(vm.flavor == "server" & !vm.emulatedClient) * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,22 +40,12 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -import jdk.test.lib.cli.predicate.NotPredicate; -public class TestUseRTMLockingOptionOnUnsupportedVM - extends CommandLineOptionTest { +public class TestUseRTMLockingOptionOnUnsupportedVM { private static final String DEFAULT_VALUE = "false"; - private TestUseRTMLockingOptionOnUnsupportedVM() { - super(new AndPredicate(new SupportedCPU(), - new NotPredicate(new SupportedVM()))); - } - @Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; @@ -82,6 +72,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMLockingOptionOnUnsupportedVM().test(); + new TestUseRTMLockingOptionOnUnsupportedVM().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java 2017-05-26 16:34:18.242927518 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java 2017-05-26 16:34:18.106927526 -0700 @@ -29,7 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management - * + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -40,20 +40,11 @@ package compiler.rtm.cli; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; -public class TestUseRTMLockingOptionWithBiasedLocking - extends CommandLineOptionTest { - private TestUseRTMLockingOptionWithBiasedLocking() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestUseRTMLockingOptionWithBiasedLocking { - @Override public void runTestCases() throws Throwable { String warningMessage = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING; @@ -98,6 +89,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMLockingOptionWithBiasedLocking().test(); + new TestUseRTMLockingOptionWithBiasedLocking().runTestCases(); } } --- old/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java 2017-05-26 16:34:18.654927497 -0700 +++ new/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java 2017-05-26 16:34:18.522927504 -0700 @@ -39,11 +39,11 @@ private static final String DEFAULT_VALUE = "true"; public TestUseRTMXendForLockBusyOption() { - super(Boolean.TRUE::booleanValue, "UseRTMXendForLockBusy", true, true, + super("UseRTMXendForLockBusy", true, true, TestUseRTMXendForLockBusyOption.DEFAULT_VALUE, "true"); } public static void main(String agrs[]) throws Throwable { - new TestUseRTMXendForLockBusyOption().test(); + new TestUseRTMXendForLockBusyOption().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMAbortRatio.java 2017-05-26 16:34:19.066927475 -0700 +++ new/test/compiler/rtm/locking/TestRTMAbortRatio.java 2017-05-26 16:34:18.930927482 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,14 +44,10 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -58,12 +55,8 @@ * Test verifies that method will be deoptimized on high abort ratio * as soon as abort ratio reaches RTMAbortRatio's value. */ -public class TestRTMAbortRatio extends CommandLineOptionTest { - private TestRTMAbortRatio() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestRTMAbortRatio { - @Override protected void runTestCases() throws Throwable { verifyAbortRatio(0, false); verifyAbortRatio(10, false); @@ -167,7 +160,7 @@ } public static void main(String args[]) throws Throwable { - new TestRTMAbortRatio().test(); + new TestRTMAbortRatio().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMAbortThreshold.java 2017-05-26 16:34:19.478927454 -0700 +++ new/test/compiler/rtm/locking/TestRTMAbortThreshold.java 2017-05-26 16:34:19.342927461 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,13 +44,9 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -57,12 +54,8 @@ * Test verifies that on RTMAbortThreshold option actually affects how soon * method will be deoptimized on high abort ratio. */ -public class TestRTMAbortThreshold extends CommandLineOptionTest { - private TestRTMAbortThreshold() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestRTMAbortThreshold { - @Override protected void runTestCases() throws Throwable { verifyAbortThreshold(false, 1); verifyAbortThreshold(false, 10); @@ -107,7 +100,7 @@ } public static void main(String args[]) throws Throwable { - new TestRTMAbortThreshold().test(); + new TestRTMAbortThreshold().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java 2017-05-26 16:34:19.894927432 -0700 +++ new/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java 2017-05-26 16:34:19.758927439 -0700 @@ -31,6 +31,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -45,14 +46,10 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -81,15 +78,10 @@ * ratio will be below 100% and there should be enough lock * attempts to recompile method without RTM profiling. */ -public class TestRTMAfterNonRTMDeopt extends CommandLineOptionTest { +public class TestRTMAfterNonRTMDeopt { private static final int ABORT_THRESHOLD = 1000; private static final String RANGE_CHECK = "range_check"; - private TestRTMAfterNonRTMDeopt() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { verifyRTMAfterDeopt(false, false); verifyRTMAfterDeopt(true, false); @@ -214,7 +206,7 @@ } public static void main(String args[]) throws Throwable { - new TestRTMAfterNonRTMDeopt().test(); + new TestRTMAfterNonRTMDeopt().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java 2017-05-26 16:34:20.314927410 -0700 +++ new/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java 2017-05-26 16:34:20.182927417 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,13 +44,9 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -61,15 +58,10 @@ * so in order to avoid issue with retriable locks -XX:RTMRetryCount=0 is used. * For more details on that issue see {@link TestUseRTMAfterLockInflation}. */ -public class TestRTMDeoptOnHighAbortRatio extends CommandLineOptionTest { +public class TestRTMDeoptOnHighAbortRatio { private static final long ABORT_THRESHOLD = AbortProvoker.DEFAULT_ITERATIONS / 2L; - private TestRTMDeoptOnHighAbortRatio() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { verifyDeopt(false); verifyDeopt(true); @@ -119,7 +111,7 @@ } public static void main(String args[]) throws Throwable { - new TestRTMDeoptOnHighAbortRatio().test(); + new TestRTMDeoptOnHighAbortRatio().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java 2017-05-26 16:34:20.718927388 -0700 +++ new/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java 2017-05-26 16:34:20.590927395 -0700 @@ -28,6 +28,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -42,14 +43,10 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -61,15 +58,10 @@ * so in order to avoid issue with retriable locks -XX:RTMRetryCount=0 is used. * For more details on that issue see {@link TestUseRTMAfterLockInflation}. */ -public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest { +public class TestRTMDeoptOnLowAbortRatio { private static final long LOCKING_THRESHOLD = 100L; private static final long ABORT_THRESHOLD = LOCKING_THRESHOLD / 2L; - private TestRTMDeoptOnLowAbortRatio() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { verifyRTMDeopt(false); verifyRTMDeopt(true); @@ -172,6 +164,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMDeoptOnLowAbortRatio().test(); + new TestRTMDeoptOnLowAbortRatio().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java 2017-05-26 16:34:21.138927366 -0700 +++ new/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java 2017-05-26 16:34:21.006927373 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -42,26 +43,17 @@ import compiler.testlibrary.rtm.AbortProvoker; import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; /** * Test verifies that abort ratio calculation could be delayed using * RTMLockingCalculationDelay option. */ -public class TestRTMLockingCalculationDelay extends CommandLineOptionTest { +public class TestRTMLockingCalculationDelay { private static final boolean INFLATE_MONITOR = true; - private TestRTMLockingCalculationDelay() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { // verify that calculation will be started immediately verifyLockingCalculationDelay(0, 0, true); @@ -110,6 +102,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMLockingCalculationDelay().test(); + new TestRTMLockingCalculationDelay().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMLockingThreshold.java 2017-05-26 16:34:21.554927344 -0700 +++ new/test/compiler/rtm/locking/TestRTMLockingThreshold.java 2017-05-26 16:34:21.422927351 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,14 +44,10 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -58,10 +55,7 @@ * Test verifies that RTMLockingThreshold option actually affects how soon * method will be deoptimized on low abort ratio. */ -public class TestRTMLockingThreshold extends CommandLineOptionTest { - private TestRTMLockingThreshold() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestRTMLockingThreshold { /** * We use non-zero abort threshold to avoid abort related to @@ -70,7 +64,6 @@ */ private static final int MIN_ABORT_THRESHOLD = 10; - @Override protected void runTestCases() throws Throwable { verifyLockingThreshold(0, false); verifyLockingThreshold(100, false); @@ -183,6 +176,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMLockingThreshold().test(); + new TestRTMLockingThreshold().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMRetryCount.java 2017-05-26 16:34:21.970927323 -0700 +++ new/test/compiler/rtm/locking/TestRTMRetryCount.java 2017-05-26 16:34:21.834927330 -0700 @@ -28,6 +28,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -42,13 +43,9 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -56,18 +53,13 @@ * Test verifies that RTMRetryCount option actually affects amount of * retries on lock busy. */ -public class TestRTMRetryCount extends CommandLineOptionTest { +public class TestRTMRetryCount { /** * Time in ms, during which busy lock will be locked. */ private static final int LOCKING_TIME = 5000; private static final boolean INFLATE_MONITOR = true; - private TestRTMRetryCount() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { verifyRTMRetryCount(0); verifyRTMRetryCount(1); @@ -107,6 +99,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMRetryCount().test(); + new TestRTMRetryCount().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMSpinLoopCount.java 2017-05-26 16:34:22.382927301 -0700 +++ new/test/compiler/rtm/locking/TestRTMSpinLoopCount.java 2017-05-26 16:34:22.246927308 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,13 +44,9 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -57,7 +54,7 @@ * Test verifies that RTMSpinLoopCount increase time spent between retries * by comparing amount of retries done with different RTMSpinLoopCount's values. */ -public class TestRTMSpinLoopCount extends CommandLineOptionTest { +public class TestRTMSpinLoopCount { private static final int LOCKING_TIME = 1000; private static final int RTM_RETRY_COUNT = 1000; private static final boolean INFLATE_MONITOR = true; @@ -65,11 +62,6 @@ private static final int[] SPIN_LOOP_COUNTS = new int[] { 0, 100, 1_000, 1_000_000, 10_000_000 }; - private TestRTMSpinLoopCount() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { long[] aborts = new long[TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length]; for (int i = 0; i < TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length; i++) { @@ -121,6 +113,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMSpinLoopCount().test(); + new TestRTMSpinLoopCount().runTestCases(); } } --- old/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java 2017-05-26 16:34:22.798927279 -0700 +++ new/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java 2017-05-26 16:34:22.666927286 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,14 +44,10 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -62,12 +59,7 @@ * -XX:RTMRetryCount=0 to avoid issue with retriable aborts. For more details on * that issue see {@link TestUseRTMAfterLockInflation}. */ -public class TestRTMTotalCountIncrRate extends CommandLineOptionTest { - private TestRTMTotalCountIncrRate() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override +public class TestRTMTotalCountIncrRate { protected void runTestCases() throws Throwable { verifyLocksCount(1, false); verifyLocksCount(64, false); @@ -167,6 +159,6 @@ } public static void main(String args[]) throws Throwable { - new TestRTMTotalCountIncrRate().test(); + new TestRTMTotalCountIncrRate().runTestCases(); } } --- old/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java 2017-05-26 16:34:23.218927257 -0700 +++ new/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java 2017-05-26 16:34:23.086927264 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,13 +44,8 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -68,15 +64,10 @@ * reasons simultaneously. In order to avoid false negative failures related * to incorrect aborts counting, -XX:RTMRetryCount=0 is used. */ -public class TestUseRTMAfterLockInflation extends CommandLineOptionTest { +public class TestUseRTMAfterLockInflation { private static final long EXPECTED_LOCKS = 2L * AbortProvoker.DEFAULT_ITERATIONS; - private TestUseRTMAfterLockInflation() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); long totalLocksCount = 0; @@ -133,6 +124,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMAfterLockInflation().test(); + new TestUseRTMAfterLockInflation().runTestCases(); } } --- old/test/compiler/rtm/locking/TestUseRTMDeopt.java 2017-05-26 16:34:23.630927235 -0700 +++ new/test/compiler/rtm/locking/TestUseRTMDeopt.java 2017-05-26 16:34:23.498927242 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -42,24 +43,16 @@ import compiler.testlibrary.rtm.AbortProvoker; import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; /** * Test verifies that usage of UseRTMDeopt option affects uncommon traps usage * for methods that use locking. */ -public class TestUseRTMDeopt extends CommandLineOptionTest { - private TestUseRTMDeopt() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestUseRTMDeopt { - @Override protected void runTestCases() throws Throwable { verifyUseRTMDeopt(false); verifyUseRTMDeopt(true); @@ -92,6 +85,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMDeopt().test(); + new TestUseRTMDeopt().runTestCases(); } } --- old/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java 2017-05-26 16:34:24.046927213 -0700 +++ new/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java 2017-05-26 16:34:23.910927221 -0700 @@ -28,6 +28,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -41,13 +42,8 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -61,12 +57,8 @@ * is used. For more information abort that issue see * {@link TestUseRTMAfterLockInflation}. */ -public class TestUseRTMForInflatedLocks extends CommandLineOptionTest { - private TestUseRTMForInflatedLocks() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestUseRTMForInflatedLocks { - @Override protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); RTMLockingStatistics lock; @@ -96,6 +88,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMForInflatedLocks().test(); + new TestUseRTMForInflatedLocks().runTestCases(); } } --- old/test/compiler/rtm/locking/TestUseRTMForStackLocks.java 2017-05-26 16:34:24.474927191 -0700 +++ new/test/compiler/rtm/locking/TestUseRTMForStackLocks.java 2017-05-26 16:34:24.322927199 -0700 @@ -28,6 +28,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -42,13 +43,8 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -62,14 +58,9 @@ * is used. For more information abort that issue see * {@link TestUseRTMAfterLockInflation}. */ -public class TestUseRTMForStackLocks extends CommandLineOptionTest { +public class TestUseRTMForStackLocks { private static final boolean INFLATE_MONITOR = false; - private TestUseRTMForStackLocks() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); RTMLockingStatistics lock; @@ -100,6 +91,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMForStackLocks().test(); + new TestUseRTMForStackLocks().runTestCases(); } } --- old/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java 2017-05-26 16:34:24.902927168 -0700 +++ new/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java 2017-05-26 16:34:24.766927176 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -44,13 +45,9 @@ import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -58,14 +55,9 @@ * Test verifies that with +UseRTMXendForLockBusy there will be no aborts * forced by the test. */ -public class TestUseRTMXendForLockBusy extends CommandLineOptionTest { +public class TestUseRTMXendForLockBusy { private final static int LOCKING_TIME = 5000; - private TestUseRTMXendForLockBusy() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { // inflated lock, xabort on lock busy verifyXendForLockBusy(true, false); @@ -117,6 +109,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMXendForLockBusy().test(); + new TestUseRTMXendForLockBusy().runTestCases(); } } --- old/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java 2017-05-26 16:34:25.370927144 -0700 +++ new/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java 2017-05-26 16:34:25.198927153 -0700 @@ -29,6 +29,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -43,13 +44,9 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -60,12 +57,8 @@ * rtm_state_change reason had happened and that that VM output * does not contain RTM locking statistics for compiled method. */ -public class TestNoRTMLockElidingOption extends CommandLineOptionTest { - private TestNoRTMLockElidingOption() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestNoRTMLockElidingOption { - @Override public void runTestCases() throws Throwable { verifyOption(false); verifyOption(true); @@ -108,6 +101,6 @@ } public static void main(String args[]) throws Throwable { - new TestNoRTMLockElidingOption().test(); + new TestNoRTMLockElidingOption().runTestCases(); } } --- old/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java 2017-05-26 16:34:25.786927122 -0700 +++ new/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java 2017-05-26 16:34:25.650927129 -0700 @@ -30,6 +30,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -44,13 +45,9 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.List; @@ -66,12 +63,8 @@ * to avoid issue with retriable aborts described in * {@link TestUseRTMAfterLockInflation}. */ -public class TestUseRTMLockElidingOption extends CommandLineOptionTest { - private TestUseRTMLockElidingOption() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestUseRTMLockElidingOption { - @Override public void runTestCases() throws Throwable { verifyOption(false); verifyOption(true); @@ -122,6 +115,6 @@ } public static void main(String args[]) throws Throwable { - new TestUseRTMLockElidingOption().test(); + new TestUseRTMLockElidingOption().runTestCases(); } } --- old/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 2017-05-26 16:34:26.206927100 -0700 +++ new/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 2017-05-26 16:34:26.074927107 -0700 @@ -31,6 +31,7 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management + * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -46,13 +47,8 @@ import compiler.testlibrary.rtm.AbortType; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; -import compiler.testlibrary.rtm.predicate.SupportedCPU; -import compiler.testlibrary.rtm.predicate.SupportedOS; -import compiler.testlibrary.rtm.predicate.SupportedVM; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.cli.CommandLineOptionTest; -import jdk.test.lib.cli.predicate.AndPredicate; import java.util.Collections; import java.util.LinkedList; @@ -64,13 +60,8 @@ * -XX:+PrintPreciseRTMLockingStatistics locking statistics contains sane * total locks and aborts count as well as for specific abort types. */ -public class TestPrintPreciseRTMLockingStatistics - extends CommandLineOptionTest { - private TestPrintPreciseRTMLockingStatistics() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } +public class TestPrintPreciseRTMLockingStatistics { - @Override public void runTestCases() throws Throwable { verifyNoStatistics(); verifyStatistics(); @@ -147,6 +138,6 @@ } public static void main(String args[]) throws Throwable { - new TestPrintPreciseRTMLockingStatistics().test(); + new TestPrintPreciseRTMLockingStatistics().runTestCases(); } } --- old/test/compiler/testlibrary/rtm/predicate/SupportedCPU.java 2017-05-26 16:34:26.738927072 -0700 +++ /dev/null 2017-01-23 12:57:10.391857738 -0800 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package compiler.testlibrary.rtm.predicate; - -import jdk.test.lib.Platform; -import sun.hotspot.cpuinfo.CPUInfo; - -import java.util.function.BooleanSupplier; - -public class SupportedCPU implements BooleanSupplier { - @Override - public boolean getAsBoolean() { - if (Platform.isPPC()) { return CPUInfo.hasFeature("tcheck"); } - return CPUInfo.hasFeature("rtm"); - } -} --- old/test/compiler/testlibrary/rtm/predicate/SupportedOS.java 2017-05-26 16:34:27.010927058 -0700 +++ /dev/null 2017-01-23 12:57:10.391857738 -0800 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package compiler.testlibrary.rtm.predicate; - -import jdk.test.lib.Platform; - -import java.util.function.BooleanSupplier; - -public class SupportedOS implements BooleanSupplier { - @Override - public boolean getAsBoolean() { - if (Platform.isAix()) { - // Actually, this works since AIX 7.1.3.30, but os.version property - // is set to 7.1. - return (Platform.getOsVersionMajor() > 7) || - (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1); - - } else if (Platform.isLinux()) { - if (Platform.isPPC()) { - return (Platform.getOsVersionMajor() > 4) || - (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1); - } - } - return true; - } -} --- old/test/compiler/testlibrary/rtm/predicate/SupportedVM.java 2017-05-26 16:34:27.286927043 -0700 +++ /dev/null 2017-01-23 12:57:10.391857738 -0800 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package compiler.testlibrary.rtm.predicate; - -import jdk.test.lib.Platform; - -import java.util.function.BooleanSupplier; - -public class SupportedVM implements BooleanSupplier { - @Override - public boolean getAsBoolean() { - return Platform.isServer() && !Platform.isEmulatedClient(); - } -}