19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
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 import compiler.whitebox.CompilerWhiteBoxTest; |
|
29 import compiler.whitebox.SimpleTestCase; |
|
30 |
|
31 /** |
24 /** |
32 * @test LevelTransitionTest |
25 * @test LevelTransitionTest |
33 * @library /testlibrary /test/lib /compiler/whitebox / |
26 * @library /testlibrary /test/lib / |
34 * @modules java.base/jdk.internal.misc |
27 * @modules java.base/jdk.internal.misc |
35 * java.management |
28 * java.management |
36 * @ignore 8067651 |
29 * @ignore 8067651 |
37 * @build TransitionsTestExecutor LevelTransitionTest |
30 * @build TransitionsTestExecutor LevelTransitionTest |
38 * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
31 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
39 * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
32 * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
40 * -XX:+WhiteBoxAPI -XX:+TieredCompilation |
33 * -XX:+WhiteBoxAPI -XX:+TieredCompilation |
41 * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* |
34 * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* |
42 * -XX:CompileCommand=compileonly,ExtendedTestCase$CompileMethodHolder::* |
35 * -XX:CompileCommand=compileonly,ExtendedTestCase$CompileMethodHolder::* |
43 * TransitionsTestExecutor LevelTransitionTest |
36 * TransitionsTestExecutor LevelTransitionTest |
44 * @summary Test the correctness of compilation level transitions for different methods |
37 * @summary Test the correctness of compilation level transitions for different methods |
45 */ |
38 */ |
|
39 |
|
40 import java.lang.reflect.Executable; |
|
41 import java.lang.reflect.Method; |
|
42 import java.util.Objects; |
|
43 import java.util.concurrent.Callable; |
|
44 import compiler.whitebox.CompilerWhiteBoxTest; |
|
45 import compiler.whitebox.SimpleTestCase; |
|
46 |
46 public class LevelTransitionTest extends TieredLevelsTest { |
47 public class LevelTransitionTest extends TieredLevelsTest { |
47 /** Shows if method was profiled by being executed on levels 2 or 3 */ |
48 /** Shows if method was profiled by being executed on levels 2 or 3 */ |
48 protected boolean isMethodProfiled; |
49 protected boolean isMethodProfiled; |
49 private int transitionCount; |
50 private int transitionCount; |
50 |
51 |