< prev index next >

test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java

Print this page

        

*** 27,36 **** --- 27,37 ---- * @summary Verify that on high abort ratio method will be recompiled * without rtm locking. * @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,57 **** 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 on high abort ratio method wil be deoptimized with --- 42,54 ----
*** 59,77 **** * be used for that method. * 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 TestRTMDeoptOnHighAbortRatio extends CommandLineOptionTest { private static final long ABORT_THRESHOLD = AbortProvoker.DEFAULT_ITERATIONS / 2L; - private TestRTMDeoptOnHighAbortRatio() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { verifyDeopt(false); verifyDeopt(true); } --- 56,69 ---- * be used for that method. * 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 TestRTMDeoptOnHighAbortRatio { private static final long ABORT_THRESHOLD = AbortProvoker.DEFAULT_ITERATIONS / 2L; protected void runTestCases() throws Throwable { verifyDeopt(false); verifyDeopt(true); }
*** 117,125 **** "After AbortThreshold was reached, method should be" + " recompiled without rtm lock eliding."); } public static void main(String args[]) throws Throwable { ! new TestRTMDeoptOnHighAbortRatio().test(); } } --- 109,117 ---- "After AbortThreshold was reached, method should be" + " recompiled without rtm lock eliding."); } public static void main(String args[]) throws Throwable { ! new TestRTMDeoptOnHighAbortRatio().runTestCases(); } }
< prev index next >