hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
changeset 46515 dbb676a40899
parent 41705 332239c052cc
equal deleted inserted replaced
46514:38a2f229b094 46515:dbb676a40899
    27  * @summary Verify UseRTMForStackLocks option processing on CPU with
    27  * @summary Verify UseRTMForStackLocks option processing on CPU with
    28  *          rtm support when VM supports rtm locking.
    28  *          rtm support when VM supports rtm locking.
    29  * @library /test/lib /
    29  * @library /test/lib /
    30  * @modules java.base/jdk.internal.misc
    30  * @modules java.base/jdk.internal.misc
    31  *          java.management
    31  *          java.management
    32  *
    32  * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
    33  * @build sun.hotspot.WhiteBox
    33  * @build sun.hotspot.WhiteBox
    34  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
    34  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
    35  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
    35  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
    36  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
    36  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
    37  *                   -XX:+WhiteBoxAPI
    37  *                   -XX:+WhiteBoxAPI
    38  *                   compiler.rtm.cli.TestUseRTMForStackLocksOptionOnSupportedConfig
    38  *                   compiler.rtm.cli.TestUseRTMForStackLocksOptionOnSupportedConfig
    39  */
    39  */
    40 
    40 
    41 package compiler.rtm.cli;
    41 package compiler.rtm.cli;
    42 
    42 
    43 import compiler.testlibrary.rtm.predicate.SupportedCPU;
       
    44 import compiler.testlibrary.rtm.predicate.SupportedOS;
       
    45 import compiler.testlibrary.rtm.predicate.SupportedVM;
       
    46 import jdk.test.lib.process.ExitCode;
    43 import jdk.test.lib.process.ExitCode;
    47 import jdk.test.lib.cli.CommandLineOptionTest;
    44 import jdk.test.lib.cli.CommandLineOptionTest;
    48 import jdk.test.lib.cli.predicate.AndPredicate;
       
    49 
    45 
    50 public class TestUseRTMForStackLocksOptionOnSupportedConfig
    46 public class TestUseRTMForStackLocksOptionOnSupportedConfig {
    51         extends CommandLineOptionTest {
       
    52     private static final String DEFAULT_VALUE = "false";
    47     private static final String DEFAULT_VALUE = "false";
    53 
    48 
    54     private TestUseRTMForStackLocksOptionOnSupportedConfig() {
       
    55         super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
       
    56     }
       
    57 
       
    58     @Override
       
    59     public void runTestCases() throws Throwable {
    49     public void runTestCases() throws Throwable {
    60         String errorMessage
    50         String errorMessage
    61                 = CommandLineOptionTest.getExperimentalOptionErrorMessage(
    51                 = CommandLineOptionTest.getExperimentalOptionErrorMessage(
    62                 "UseRTMForStackLocks");
    52                 "UseRTMForStackLocks");
    63         String warningMessage
    53         String warningMessage
   125                         CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
   115                         CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
   126                         "-XX:+UseRTMLocking", "-XX:+UseRTMForStackLocks");
   116                         "-XX:+UseRTMLocking", "-XX:+UseRTMForStackLocks");
   127     }
   117     }
   128 
   118 
   129     public static void main(String args[]) throws Throwable {
   119     public static void main(String args[]) throws Throwable {
   130         new TestUseRTMForStackLocksOptionOnSupportedConfig().test();
   120         new TestUseRTMForStackLocksOptionOnSupportedConfig().runTestCases();
   131     }
   121     }
   132 }
   122 }