test/compiler/types/correctness/CorrectnessTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff test/compiler/types/correctness

test/compiler/types/correctness/CorrectnessTest.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test CorrectnessTest
  26  * @bug 8038418
  27  * @library /testlibrary /testlibrary/whitebox
  28  * @ignore 8066173
  29  * @compile execution/TypeConflict.java execution/TypeProfile.java
  30  *          execution/MethodHandleDelegate.java
  31  * @build CorrectnessTest
  32  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  33  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  34  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  35  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  36  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  37  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  38  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  39  *                   CorrectnessTest RETURN
  40  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  41  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  42  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  43  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  44  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  45  *                   CorrectnessTest PARAMETERS
  46  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  47  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  48  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  49  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  50  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  51  *                   CorrectnessTest ARGUMENTS
  52  * @summary Tests correctness of type usage with type profiling and speculations
  53  */
  54 
  55 import com.oracle.java.testlibrary.Asserts;
  56 import com.oracle.java.testlibrary.Platform;
  57 import execution.Execution;
  58 import execution.MethodHandleDelegate;
  59 import execution.TypeConflict;
  60 import execution.TypeProfile;
  61 import hierarchies.*;
  62 import scenarios.*;
  63 import sun.hotspot.WhiteBox;
  64 
  65 import java.lang.reflect.Constructor;
  66 import java.lang.reflect.Method;
  67 import java.util.ArrayList;
  68 import java.util.List;
  69 import java.util.function.BiFunction;
  70 
  71 public class CorrectnessTest {
  72     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  73 
  74     public static void main(String[] args) {
  75         if (!Platform.isServer()) {
  76             System.out.println("ALL TESTS SKIPPED");
  77         }
  78         Asserts.assertGTE(args.length, 1);
  79         ProfilingType profilingType = ProfilingType.valueOf(args[0]);
  80         if (runTests(profilingType)) {
  81             System.out.println("ALL TESTS PASSED");
  82         } else {
  83             throw new RuntimeException("SOME TESTS FAILED");




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test CorrectnessTest
  26  * @bug 8038418
  27  * @library /testlibrary /../../test/lib
  28  * @ignore 8066173
  29  * @compile execution/TypeConflict.java execution/TypeProfile.java
  30  *          execution/MethodHandleDelegate.java
  31  * @build CorrectnessTest
  32  * @run main ClassFileInstaller jdk.testlib.WhiteBox
  33  *                              jdk.testlib.WhiteBox$WhiteBoxPermission
  34  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  35  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  36  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  37  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  38  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  39  *                   CorrectnessTest RETURN
  40  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  41  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  42  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  43  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  44  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  45  *                   CorrectnessTest PARAMETERS
  46  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
  47  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  48  *                   -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
  49  *                   -XX:CompileCommand=exclude,execution/*::methodNotToCompile
  50  *                   -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
  51  *                   CorrectnessTest ARGUMENTS
  52  * @summary Tests correctness of type usage with type profiling and speculations
  53  */
  54 
  55 import com.oracle.java.testlibrary.Asserts;
  56 import com.oracle.java.testlibrary.Platform;
  57 import execution.Execution;
  58 import execution.MethodHandleDelegate;
  59 import execution.TypeConflict;
  60 import execution.TypeProfile;
  61 import hierarchies.*;
  62 import scenarios.*;
  63 import jdk.testlib.WhiteBox;
  64 
  65 import java.lang.reflect.Constructor;
  66 import java.lang.reflect.Method;
  67 import java.util.ArrayList;
  68 import java.util.List;
  69 import java.util.function.BiFunction;
  70 
  71 public class CorrectnessTest {
  72     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  73 
  74     public static void main(String[] args) {
  75         if (!Platform.isServer()) {
  76             System.out.println("ALL TESTS SKIPPED");
  77         }
  78         Asserts.assertGTE(args.length, 1);
  79         ProfilingType profilingType = ProfilingType.valueOf(args[0]);
  80         if (runTests(profilingType)) {
  81             System.out.println("ALL TESTS PASSED");
  82         } else {
  83             throw new RuntimeException("SOME TESTS FAILED");


test/compiler/types/correctness/CorrectnessTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File