RFR: 8263582: WB_IsMethodCompilable ignores compiler directives [v2]

Vladimir Kozlov kvn at openjdk.java.net
Fri Mar 26 22:32:33 UTC 2021


On Fri, 26 Mar 2021 08:55:39 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> src/hotspot/share/prims/whitebox.cpp line 869:
>> 
>>> 867:     // Both compilers could have ExcludeOption set. Check all combinations.
>>> 868:     bool excluded_c1 = is_excluded_for_compiler(CompileBroker::compiler1(), mh);
>>> 869:     bool excluded_c2 = is_excluded_for_compiler(CompileBroker::compiler2(), mh);
>> 
>> May be use next instead as we do in `WhiteBox::compile_method` at line #992:
>>  *comp = CompileBroker::compiler(comp_level);```
>
> The problem is that `CompileBroker::compiler()` returns `NULL` for `CompLevel_any`. And even if it returned one compiler, I also need to check the other one to decide if the method is completly non-compilable. That's why I added this additional logic for `CompLevel_any`.

I thought `exclude` command does not specify which compilation level (and corresponding compiler) is disabled - it disables all compilations.
But may be it is not true for directives. @neliasso, please, correct me if I am wrong.

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

PR: https://git.openjdk.java.net/jdk/pull/3195


More information about the hotspot-compiler-dev mailing list