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

Tobias Hartmann thartmann at openjdk.org
Wed Apr 9 12:29:31 UTC 2025


On Wed, 9 Apr 2025 10:13:20 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 `.

Looking at other usages of `CompLevel_any`/`CompLevel_all`, I'm concerned that JDK-8334046 accidentally introduced some semantic changes. I think we should back it out and redo.

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

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


More information about the hotspot-compiler-dev mailing list