< prev index next >

test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java

Print this page

        

*** 26,35 **** --- 26,36 ---- * @bug 8031320 * @summary Verify that rtm locking is used for inflated 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 compiler.rtm.locking.TestUseRTMForInflatedLocks
*** 39,55 **** 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 inflated locks --- 40,51 ----
*** 59,74 **** * 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 TestUseRTMForInflatedLocks extends CommandLineOptionTest { ! private TestUseRTMForInflatedLocks() { ! 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( --- 55,66 ---- * 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 TestUseRTMForInflatedLocks { protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); RTMLockingStatistics lock; OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest(
*** 94,101 **** "Total lock count should be greater or equal to " + AbortProvoker.DEFAULT_ITERATIONS); } public static void main(String args[]) throws Throwable { ! new TestUseRTMForInflatedLocks().test(); } } --- 86,93 ---- "Total lock count should be greater or equal to " + AbortProvoker.DEFAULT_ITERATIONS); } public static void main(String args[]) throws Throwable { ! new TestUseRTMForInflatedLocks().runTestCases(); } }
< prev index next >