< prev index next >
test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
Print this page
@@ -29,10 +29,11 @@
* different types. Test also verify that VM output does not
* contain rtm locking statistics when it should not.
* @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
@@ -44,17 +45,12 @@
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.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -62,17 +58,12 @@
* Test verifies that VM output does not contain RTM locking statistics when it
* should not (when PrintPreciseRTMLockingStatistics is off) and that with
* -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();
}
@@ -145,8 +136,8 @@
"RTM locking statistics should contain non zero aborts count "
+ "for abort reason %s", abortType));
}
public static void main(String args[]) throws Throwable {
- new TestPrintPreciseRTMLockingStatistics().test();
+ new TestPrintPreciseRTMLockingStatistics().runTestCases();
}
}
< prev index next >