< prev index next >
test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java
Print this page
*** 28,37 ****
--- 28,38 ----
* specified method and that such method will not be deoptimized
* on high abort ratio.
* @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
*** 42,58 ****
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>UseRTMLockElidingOption</i>
--- 43,55 ----
*** 64,79 ****
* count equals to method's invocations.
* Since last assert is pretty strict, test uses -XX:RTMRetryCount=0 in order
* 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()));
! }
- @Override
public void runTestCases() throws Throwable {
verifyOption(false);
verifyOption(true);
}
--- 61,72 ----
* count equals to method's invocations.
* Since last assert is pretty strict, test uses -XX:RTMRetryCount=0 in order
* to avoid issue with retriable aborts described in
* {@link TestUseRTMAfterLockInflation}.
*/
! public class TestUseRTMLockElidingOption {
public void runTestCases() throws Throwable {
verifyOption(false);
verifyOption(true);
}
*** 120,127 ****
"Expected to get total locks count equal to total amount of "
+ "lock attempts.");
}
public static void main(String args[]) throws Throwable {
! new TestUseRTMLockElidingOption().test();
}
}
--- 113,120 ----
"Expected to get total locks count equal to total amount of "
+ "lock attempts.");
}
public static void main(String args[]) throws Throwable {
! new TestUseRTMLockElidingOption().runTestCases();
}
}
< prev index next >