< prev index next >
test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java
Print this page
*** 27,36 ****
--- 27,37 ----
* @summary Verify that UseRTMXendForLockBusy option affects
* method behaviour if lock is busy.
* @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,73 ****
import compiler.testlibrary.rtm.AbortType;
import compiler.testlibrary.rtm.BusyLock;
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;
/**
* Test verifies that with +UseRTMXendForLockBusy there will be no aborts
* forced by the test.
*/
! public class TestUseRTMXendForLockBusy extends CommandLineOptionTest {
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);
// inflated lock, xend on lock busy
verifyXendForLockBusy(true, true);
--- 43,65 ----
import compiler.testlibrary.rtm.AbortType;
import compiler.testlibrary.rtm.BusyLock;
import compiler.testlibrary.rtm.CompilableTest;
import compiler.testlibrary.rtm.RTMLockingStatistics;
import compiler.testlibrary.rtm.RTMTestBase;
import jdk.test.lib.Asserts;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.cli.CommandLineOptionTest;
import java.util.List;
/**
* Test verifies that with +UseRTMXendForLockBusy there will be no aborts
* forced by the test.
*/
! public class TestUseRTMXendForLockBusy {
private final static int LOCKING_TIME = 5000;
protected void runTestCases() throws Throwable {
// inflated lock, xabort on lock busy
verifyXendForLockBusy(true, false);
// inflated lock, xend on lock busy
verifyXendForLockBusy(true, true);
*** 115,122 ****
"Expected to get at least one abort on busy lock");
}
}
public static void main(String args[]) throws Throwable {
! new TestUseRTMXendForLockBusy().test();
}
}
--- 107,114 ----
"Expected to get at least one abort on busy lock");
}
}
public static void main(String args[]) throws Throwable {
! new TestUseRTMXendForLockBusy().runTestCases();
}
}
< prev index next >