< prev index next >

test/compiler/tiered/LevelTransitionTest.java

Print this page




  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 import java.lang.reflect.Executable;
  25 import java.lang.reflect.Method;
  26 import java.util.Objects;
  27 import java.util.concurrent.Callable;
  28 
  29 /**
  30  * @test LevelTransitionTest
  31  * @library /testlibrary /../../test/lib /compiler/whitebox
  32  * @build TransitionsTestExecutor LevelTransitionTest
  33  * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  34  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  35  *                   -XX:+WhiteBoxAPI -XX:+TieredCompilation
  36  *                   -XX:CompileCommand=compileonly,SimpleTestCase$Helper::*
  37  *                   -XX:CompileCommand=compileonly,ExtendedTestCase$CompileMethodHolder::*
  38  *                   TransitionsTestExecutor LevelTransitionTest
  39  * @summary Test the correctness of compilation level transitions for different methods
  40  */
  41 public class LevelTransitionTest extends TieredLevelsTest {
  42     /** Shows if method was profiled by being executed on levels 2 or 3 */
  43     protected boolean isMethodProfiled;
  44     private int transitionCount;
  45 
  46     public static void main(String[] args) throws Throwable {
  47         assert (!CompilerWhiteBoxTest.skipOnTieredCompilation(false));
  48 
  49         CompilerWhiteBoxTest.main(LevelTransitionTest::new, args);
  50         // run extended test cases
  51         for (TestCase testCase : ExtendedTestCase.values()) {
  52             new LevelTransitionTest(testCase).runTest();




  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 import java.lang.reflect.Executable;
  25 import java.lang.reflect.Method;
  26 import java.util.Objects;
  27 import java.util.concurrent.Callable;
  28 
  29 /**
  30  * @test LevelTransitionTest
  31  * @library /testlibrary /../../test/lib /compiler/whitebox
  32  * @build com.oracle.java.testlibrary.* TransitionsTestExecutor LevelTransitionTest
  33  * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  34  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  35  *                   -XX:+WhiteBoxAPI -XX:+TieredCompilation
  36  *                   -XX:CompileCommand=compileonly,SimpleTestCase$Helper::*
  37  *                   -XX:CompileCommand=compileonly,ExtendedTestCase$CompileMethodHolder::*
  38  *                   TransitionsTestExecutor LevelTransitionTest
  39  * @summary Test the correctness of compilation level transitions for different methods
  40  */
  41 public class LevelTransitionTest extends TieredLevelsTest {
  42     /** Shows if method was profiled by being executed on levels 2 or 3 */
  43     protected boolean isMethodProfiled;
  44     private int transitionCount;
  45 
  46     public static void main(String[] args) throws Throwable {
  47         assert (!CompilerWhiteBoxTest.skipOnTieredCompilation(false));
  48 
  49         CompilerWhiteBoxTest.main(LevelTransitionTest::new, args);
  50         // run extended test cases
  51         for (TestCase testCase : ExtendedTestCase.values()) {
  52             new LevelTransitionTest(testCase).runTest();


< prev index next >