RFR: 8354130: Assert failure at CompilationPolicy::can_be_compiled after JDK-8334046

Yudi Zheng yzheng at openjdk.org
Wed Apr 9 10:16:46 UTC 2025


On Wed, 9 Apr 2025 10:11:36 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:

> With https://github.com/openjdk/jdk/pull/24298 , `CompLevel_any` and `CompLevel_all` are now different, causing an assertion failure in CompilationPolicy::can_be_compiled. This PR includes `CompLevel_all` in the assertion condition.

src/hotspot/share/compiler/compilationPolicy.cpp line 125:

> 123: bool CompilationPolicy::can_be_compiled(const methodHandle& m, int comp_level) {
> 124:   // allow any levels for WhiteBox
> 125:   assert(WhiteBoxAPI || comp_level == CompLevel_any || comp_level == CompLevel_all || is_compile(comp_level), "illegal compilation level");

@JohnTortugo could you please review this? I assume you have audited all other places where we use `CompLevel_any` and `CompLevel_all `.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24540#discussion_r2035042211


More information about the hotspot-compiler-dev mailing list