< prev index next >

test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java

Print this page

        

*** 27,36 **** --- 27,37 ---- * @summary Verify that rtm locking is used for stack locks before * inflation and after it 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
*** 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 RTM is used after lock inflation by executing compiled --- 42,53 ----
*** 66,84 **** * happened: it could be {@code AbortType.RETRIABLE} or * {@code AbortType.MEM_CONFLICT}, but unfortunately abort can has both these * reasons simultaneously. In order to avoid false negative failures related * to incorrect aborts counting, -XX:RTMRetryCount=0 is used. */ ! public class TestUseRTMAfterLockInflation extends CommandLineOptionTest { private static final long EXPECTED_LOCKS = 2L * AbortProvoker.DEFAULT_ITERATIONS; - private TestUseRTMAfterLockInflation() { - super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())); - } - - @Override protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); long totalLocksCount = 0; OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest( --- 62,75 ---- * happened: it could be {@code AbortType.RETRIABLE} or * {@code AbortType.MEM_CONFLICT}, but unfortunately abort can has both these * reasons simultaneously. In order to avoid false negative failures related * to incorrect aborts counting, -XX:RTMRetryCount=0 is used. */ ! public class TestUseRTMAfterLockInflation { private static final long EXPECTED_LOCKS = 2L * AbortProvoker.DEFAULT_ITERATIONS; protected void runTestCases() throws Throwable { AbortProvoker provoker = AbortType.XABORT.provoker(); long totalLocksCount = 0; OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest(
*** 131,138 **** } } } public static void main(String args[]) throws Throwable { ! new TestUseRTMAfterLockInflation().test(); } } --- 122,129 ---- } } } public static void main(String args[]) throws Throwable { ! new TestUseRTMAfterLockInflation().runTestCases(); } }
< prev index next >