< prev index next >
test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java
Print this page
@@ -27,10 +27,11 @@
* @summary Verify that NoRTMLockEliding option could be applied to
* specified method and that such method will not use rtm.
* @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
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
@@ -41,33 +42,25 @@
import compiler.testlibrary.rtm.AbortProvoker;
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;
/**
* Test verifies that method tagged with option <i>NoRTMLockElidingOption</i>
* will not use RTM-based lock elision.
* Test invokes compiled method and checks that no deoptimization with
* <i>rtm_state_change</i> 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);
}
@@ -106,8 +99,8 @@
"VM output should not contain RTM locking statistics entries "
+ "for method " + provoker.getMethodWithLockName());
}
public static void main(String args[]) throws Throwable {
- new TestNoRTMLockElidingOption().test();
+ new TestNoRTMLockElidingOption().runTestCases();
}
}
< prev index next >