< prev index next >

test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java

Print this page

        

@@ -26,10 +26,11 @@
  * @bug 8031320
  * @summary Verify that on low abort ratio method will be recompiled.
  * @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

@@ -40,18 +41,14 @@
 
 import compiler.testlibrary.rtm.AbortProvoker;
 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;
 
 /**
  * Test verifies that low abort ratio method will be deoptimized with

@@ -59,19 +56,14 @@
  * elision after that.
  * This test make asserts on total locks count done by compiled method,
  * 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);
     }
 

@@ -170,8 +162,8 @@
             }
         }
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMDeoptOnLowAbortRatio().test();
+        new TestRTMDeoptOnLowAbortRatio().runTestCases();
     }
 }
< prev index next >