8367613: Test compiler/runtime/TestDontCompileHugeMethods.java failed

Reviewed-by: chagedorn, dfenacci
This commit is contained in:
Man Cao 2025-09-19 19:53:33 +00:00
parent 3d4e049194
commit 25a4e26320

View File

@ -23,7 +23,7 @@
/**
* @test
* @bug 8366118
* @bug 8366118 8367613
* @summary Check that a huge method is not compiled under -XX:+DontCompileHugeMethods.
* @library /test/lib
* @run main compiler.runtime.TestDontCompileHugeMethods
@ -99,6 +99,10 @@ public class TestDontCompileHugeMethods {
private static void runTest(Path workDir, List jvmArgs) throws Exception {
ArrayList<String> command = new ArrayList<>();
// Disable inlining for shortMethod().
// Otherwise under "-Xcomp -XX:TieredStopAtLevel=1", shortMethod() is inlined into main(),
// and is not directly executed or compiled.
command.add("-XX:CompileCommand=dontinline,HugeSwitch::shortMethod");
command.add("-XX:+PrintCompilation");
command.add("-Xbatch");
command.addAll(jvmArgs);