< prev index next >

test/compiler/jvmci/compilerToVM/ReprofileTest.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  34  *          jdk.vm.ci/jdk.vm.ci.hotspot
  35  *          jdk.vm.ci/jdk.vm.ci.code
  36  *          jdk.vm.ci/jdk.vm.ci.meta
  37  * @ignore 8157861
  38  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  39  * @build sun.hotspot.WhiteBox
  40  * @build compiler.jvmci.compilerToVM.ReprofileTest
  41  * @run main ClassFileInstaller
  42  *      sun.hotspot.WhiteBox
  43  *      sun.hotspot.WhiteBox$WhiteBoxPermission
  44  * @run main/othervm -Xbootclasspath/a:.
  45  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  46  *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  47  *                   -Xmixed
  48  *                   compiler.jvmci.compilerToVM.ReprofileTest
  49  */
  50 
  51 package compiler.jvmci.compilerToVM;
  52 
  53 import compiler.jvmci.common.CTVMUtilities;
  54 import java.lang.reflect.Method;
  55 import java.util.ArrayList;
  56 import java.util.List;
  57 
  58 import compiler.whitebox.CompilerWhiteBoxTest;
  59 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
  60 import jdk.vm.ci.hotspot.CompilerToVMHelper;

  61 import jdk.vm.ci.meta.ProfilingInfo;
  62 import jdk.test.lib.Asserts;
  63 




  64 public class ReprofileTest {
  65 
  66     public static void main(String[] args) {
  67         List<Method> testCases = createTestCases();
  68         testCases.forEach(ReprofileTest::runSanityTest);
  69     }
  70 
  71     private static List<Method> createTestCases() {
  72         List<Method> testCases = new ArrayList<>();
  73         try {
  74 
  75             Class<?> aClass = DummyClass.class;
  76             testCases.add(aClass.getMethod("dummyInstanceFunction"));
  77 
  78             aClass = DummyClass.class;
  79             testCases.add(aClass.getMethod("dummyFunction"));
  80         } catch (NoSuchMethodException e) {
  81             throw new Error("TEST BUG " + e.getMessage(), e);
  82         }
  83         return testCases;




  34  *          jdk.vm.ci/jdk.vm.ci.hotspot
  35  *          jdk.vm.ci/jdk.vm.ci.code
  36  *          jdk.vm.ci/jdk.vm.ci.meta
  37  * @ignore 8157861
  38  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  39  * @build sun.hotspot.WhiteBox
  40  * @build compiler.jvmci.compilerToVM.ReprofileTest
  41  * @run main ClassFileInstaller
  42  *      sun.hotspot.WhiteBox
  43  *      sun.hotspot.WhiteBox$WhiteBoxPermission
  44  * @run main/othervm -Xbootclasspath/a:.
  45  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  46  *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  47  *                   -Xmixed
  48  *                   compiler.jvmci.compilerToVM.ReprofileTest
  49  */
  50 
  51 package compiler.jvmci.compilerToVM;
  52 
  53 import compiler.jvmci.common.CTVMUtilities;




  54 import compiler.whitebox.CompilerWhiteBoxTest;
  55 import jdk.test.lib.Asserts;
  56 import jdk.vm.ci.hotspot.CompilerToVMHelper;
  57 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
  58 import jdk.vm.ci.meta.ProfilingInfo;

  59 
  60 import java.lang.reflect.Method;
  61 import java.util.ArrayList;
  62 import java.util.List;
  63 
  64 public class ReprofileTest {
  65 
  66     public static void main(String[] args) {
  67         List<Method> testCases = createTestCases();
  68         testCases.forEach(ReprofileTest::runSanityTest);
  69     }
  70 
  71     private static List<Method> createTestCases() {
  72         List<Method> testCases = new ArrayList<>();
  73         try {
  74 
  75             Class<?> aClass = DummyClass.class;
  76             testCases.add(aClass.getMethod("dummyInstanceFunction"));
  77 
  78             aClass = DummyClass.class;
  79             testCases.add(aClass.getMethod("dummyFunction"));
  80         } catch (NoSuchMethodException e) {
  81             throw new Error("TEST BUG " + e.getMessage(), e);
  82         }
  83         return testCases;


< prev index next >