From 25a4e26320340cdda082cd45639e73b137ce45a2 Mon Sep 17 00:00:00 2001 From: Man Cao Date: Fri, 19 Sep 2025 19:53:33 +0000 Subject: [PATCH] 8367613: Test compiler/runtime/TestDontCompileHugeMethods.java failed Reviewed-by: chagedorn, dfenacci --- .../jtreg/compiler/runtime/TestDontCompileHugeMethods.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/runtime/TestDontCompileHugeMethods.java b/test/hotspot/jtreg/compiler/runtime/TestDontCompileHugeMethods.java index c5e035edbd0..bd367e7ed5b 100644 --- a/test/hotspot/jtreg/compiler/runtime/TestDontCompileHugeMethods.java +++ b/test/hotspot/jtreg/compiler/runtime/TestDontCompileHugeMethods.java @@ -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 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);