< prev index next >

test/compiler/codecache/cli/common/CodeCacheCLITestCase.java

Print this page




  26 import com.oracle.java.testlibrary.cli.CommandLineOptionTest;
  27 import sun.hotspot.code.BlobType;
  28 
  29 import java.util.Collections;
  30 import java.util.EnumSet;
  31 import java.util.LinkedList;
  32 import java.util.List;
  33 import java.util.function.Function;
  34 
  35 /**
  36  * Code cache related command line option test case consisting of description
  37  * of code heaps used during test case run and additional options that should
  38  * be passed to JVM and runner aimed to perform actual testing based on the
  39  * description.
  40  */
  41 public class CodeCacheCLITestCase {
  42     private static final Function<CodeCacheOptions, Boolean> ONLY_SEGMENTED
  43             = options -> options.segmented;
  44     private static final Function<CodeCacheOptions, Boolean> SEGMENTED_SERVER
  45             = ONLY_SEGMENTED.andThen(isSegmented -> isSegmented
  46                     && Platform.isServer());
  47     private static final String USE_INT_MODE = "-Xint";
  48     private static final String SEGMENTED_CODE_CACHE = "SegmentedCodeCache";
  49     private static final String TIERED_COMPILATION = "TieredCompilation";
  50     private static final String TIERED_STOP_AT = "TieredStopAtLevel";
  51 
  52     private final Description description;
  53     private final Runner runner;
  54 
  55     public CodeCacheCLITestCase(Description description, Runner runner) {
  56         this.description = description;
  57         this.runner = runner;
  58     }
  59 
  60     public final void run(CodeCacheOptions options) throws Throwable {
  61         if (description.isApplicable(options)) {
  62             runner.run(description, options);
  63         }
  64     }
  65 
  66     public enum CommonDescriptions {




  26 import com.oracle.java.testlibrary.cli.CommandLineOptionTest;
  27 import sun.hotspot.code.BlobType;
  28 
  29 import java.util.Collections;
  30 import java.util.EnumSet;
  31 import java.util.LinkedList;
  32 import java.util.List;
  33 import java.util.function.Function;
  34 
  35 /**
  36  * Code cache related command line option test case consisting of description
  37  * of code heaps used during test case run and additional options that should
  38  * be passed to JVM and runner aimed to perform actual testing based on the
  39  * description.
  40  */
  41 public class CodeCacheCLITestCase {
  42     private static final Function<CodeCacheOptions, Boolean> ONLY_SEGMENTED
  43             = options -> options.segmented;
  44     private static final Function<CodeCacheOptions, Boolean> SEGMENTED_SERVER
  45             = ONLY_SEGMENTED.andThen(isSegmented -> isSegmented
  46                     && Platform.isServer() && Platform.isTieredSupported());
  47     private static final String USE_INT_MODE = "-Xint";
  48     private static final String SEGMENTED_CODE_CACHE = "SegmentedCodeCache";
  49     private static final String TIERED_COMPILATION = "TieredCompilation";
  50     private static final String TIERED_STOP_AT = "TieredStopAtLevel";
  51 
  52     private final Description description;
  53     private final Runner runner;
  54 
  55     public CodeCacheCLITestCase(Description description, Runner runner) {
  56         this.description = description;
  57         this.runner = runner;
  58     }
  59 
  60     public final void run(CodeCacheOptions options) throws Throwable {
  61         if (description.isApplicable(options)) {
  62             runner.run(description, options);
  63         }
  64     }
  65 
  66     public enum CommonDescriptions {


< prev index next >