RFR: 8367613: Test compiler/runtime/TestDontCompileHugeMethods.java failed [v2]

Man Cao manc at openjdk.org
Tue Sep 16 22:09:24 UTC 2025


On Tue, 16 Sep 2025 21:59:10 GMT, Man Cao <manc at openjdk.org> wrote:

>> Hi,
>> 
>> Could anyone approve this change that exclude this test when running with `-Xcomp`? This avoids the test failure reported in [JDK-8367613](https://bugs.openjdk.org/browse/JDK-8367613).
>> 
>> For reasons I don't yet understand, the `HugeSwitch::shortMethod` method is not compiled under `-Xcomp  -XX:TieredStopAtLevel=1`. The method gets compiled with either `-Xcomp` or `-XX:TieredStopAtLevel=1`, but not both. I appreciate if anyone could provide insights on possible reasons.
>
> Man Cao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Switch to disable inlining for shortMethod

Thank you for the review and suggestions.

@chhagedorn Thank you for the explanation. I switched to `-XX:CompileCommand=dontinline` for `shortMethod()`. It works for `-Xcomp -XX:TieredStopAtLevel=1`.

The benefit of `dontinline` approach is that it allows the test run under `-Xcomp`, esp. `-XX:-TieredCompilation` with `-Xcomp`. It is also future-proof, in case C2 manages to inline `shortMethod()` into `main()` under `-Xcomp` in the future.

Also added bug number. And excluding `-XX:TieredStopAtLevel=1` is no longer needed.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27306#issuecomment-3300497116


More information about the hotspot-compiler-dev mailing list