< prev index next >

test/compiler/rtm/locking/TestRTMAbortRatio.java

Print this page

        

*** 27,36 **** --- 27,37 ---- * @summary Verify that RTMAbortRatio affects amount of aborts before * deoptimization. * @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,71 **** 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 method will be deoptimized on high abort ratio * as soon as abort ratio reaches RTMAbortRatio's value. */ ! public class TestRTMAbortRatio extends CommandLineOptionTest { ! private TestRTMAbortRatio() { ! super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); ! } - @Override protected void runTestCases() throws Throwable { verifyAbortRatio(0, false); verifyAbortRatio(10, false); verifyAbortRatio(50, false); verifyAbortRatio(100, false); --- 42,64 ---- import compiler.testlibrary.rtm.AbortProvoker; import compiler.testlibrary.rtm.CompilableTest; import compiler.testlibrary.rtm.RTMLockingStatistics; import compiler.testlibrary.rtm.RTMTestBase; import jdk.internal.misc.Unsafe; import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.cli.CommandLineOptionTest; import java.util.List; /** * Test verifies that method will be deoptimized on high abort ratio * as soon as abort ratio reaches RTMAbortRatio's value. */ ! public class TestRTMAbortRatio { protected void runTestCases() throws Throwable { verifyAbortRatio(0, false); verifyAbortRatio(10, false); verifyAbortRatio(50, false); verifyAbortRatio(100, false);
*** 165,173 **** } } } public static void main(String args[]) throws Throwable { ! new TestRTMAbortRatio().test(); } } --- 158,166 ---- } } } public static void main(String args[]) throws Throwable { ! new TestRTMAbortRatio().runTestCases(); } }
< prev index next >