< prev index next >

test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java

Print this page
rev 13277 : 8184800: Streamline RTM flag validity testing with generic flag testing support


  21  * questions.
  22  */
  23 
  24 package compiler.rtm.cli;
  25 
  26 import jdk.test.lib.process.ExitCode;
  27 import jdk.test.lib.Platform;
  28 import jdk.test.lib.cli.CommandLineOptionTest;
  29 
  30 import java.util.function.BooleanSupplier;
  31 
  32 /**
  33  * Base for all RTM-related CLI tests.
  34  */
  35 public abstract class RTMGenericCommandLineOptionTest {
  36 
  37     protected static final String RTM_INSTR_ERROR
  38             = "RTM instructions are not available on this CPU";
  39     protected static final String RTM_UNSUPPORTED_VM_ERROR
  40             = "RTM locking optimization is not supported in this VM";
  41     protected static final String RTM_ABORT_RATIO_WARNING
  42             = "RTMAbortRatio must be in the range 0 to 100, resetting it to 50";
  43     protected static final String RTM_FOR_STACK_LOCKS_WARNING
  44             = "UseRTMForStackLocks flag should be off when UseRTMLocking "
  45             + "flag is off";
  46     protected static final String RTM_COUNT_INCR_WARNING
  47             = "RTMTotalCountIncrRate must be a power of 2, resetting it to 64";
  48     protected static final String RTM_BIASED_LOCKING_WARNING
  49             = "Biased locking is not supported with RTM locking; "
  50             + "ignoring UseBiasedLocking flag";
  51 
  52     protected final String optionName;
  53     protected final String errorMessage;
  54     protected final String experimentalOptionError;
  55     protected final boolean isExperimental;
  56     protected final boolean isBoolean;
  57     protected final String defaultValue;
  58     protected final String[] optionValues;
  59 
  60     /**
  61      * Constructs new genetic RTM CLI test, for option {@code optionName} which
  62      * has default value {@code defaultValue}. Test cases will use option's
  63      * values passed via {@code optionValues} for verification of correct
  64      * option processing.
  65      *
  66      * Test constructed using this ctor will be started on any cpu regardless
  67      * it's architecture and supported/unsupported features.




  21  * questions.
  22  */
  23 
  24 package compiler.rtm.cli;
  25 
  26 import jdk.test.lib.process.ExitCode;
  27 import jdk.test.lib.Platform;
  28 import jdk.test.lib.cli.CommandLineOptionTest;
  29 
  30 import java.util.function.BooleanSupplier;
  31 
  32 /**
  33  * Base for all RTM-related CLI tests.
  34  */
  35 public abstract class RTMGenericCommandLineOptionTest {
  36 
  37     protected static final String RTM_INSTR_ERROR
  38             = "RTM instructions are not available on this CPU";
  39     protected static final String RTM_UNSUPPORTED_VM_ERROR
  40             = "RTM locking optimization is not supported in this VM";


  41     protected static final String RTM_FOR_STACK_LOCKS_WARNING
  42             = "UseRTMForStackLocks flag should be off when UseRTMLocking "
  43             + "flag is off";
  44     protected static final String RTM_COUNT_INCR_WARNING
  45             = "must be a power of 2, resetting it to 64";
  46     protected static final String RTM_BIASED_LOCKING_WARNING
  47             = "Biased locking is not supported with RTM locking; "
  48             + "ignoring UseBiasedLocking flag";
  49 
  50     protected final String optionName;
  51     protected final String errorMessage;
  52     protected final String experimentalOptionError;
  53     protected final boolean isExperimental;
  54     protected final boolean isBoolean;
  55     protected final String defaultValue;
  56     protected final String[] optionValues;
  57 
  58     /**
  59      * Constructs new genetic RTM CLI test, for option {@code optionName} which
  60      * has default value {@code defaultValue}. Test cases will use option's
  61      * values passed via {@code optionValues} for verification of correct
  62      * option processing.
  63      *
  64      * Test constructed using this ctor will be started on any cpu regardless
  65      * it's architecture and supported/unsupported features.


< prev index next >