< prev index next >

test/compiler/rtm/locking/TestUseRTMForStackLocks.java

Print this page

        

*** 26,35 **** --- 26,36 ---- * @bug 8031320 * @summary Verify that rtm locking is used for stack locks. * @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,56 **** 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 RTM-based lock elision could be used for stack locks --- 41,52 ----
*** 60,77 **** * so total locks count should be the same. * This test could also be affected by retriable aborts, so -XX:RTMRetryCount=0 * is used. For more information abort that issue see * {@link TestUseRTMAfterLockInflation}. */ ! public class TestUseRTMForStackLocks extends CommandLineOptionTest { private static final boolean INFLATE_MONITOR = false; - private TestUseRTMForStackLocks() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); RTMLockingStatistics lock; OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest( --- 56,68 ---- * so total locks count should be the same. * This test could also be affected by retriable aborts, so -XX:RTMRetryCount=0 * is used. For more information abort that issue see * {@link TestUseRTMAfterLockInflation}. */ ! public class TestUseRTMForStackLocks { private static final boolean INFLATE_MONITOR = false; protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); RTMLockingStatistics lock; OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest(
*** 98,105 **** "Total locks count should be greater or equal to " + AbortProvoker.DEFAULT_ITERATIONS); } public static void main(String args[]) throws Throwable { ! new TestUseRTMForStackLocks().test(); } } --- 89,96 ---- "Total locks count should be greater or equal to " + AbortProvoker.DEFAULT_ITERATIONS); } public static void main(String args[]) throws Throwable { ! new TestUseRTMForStackLocks().runTestCases(); } }
< prev index next >