RFR: 8251462: Remove legacy compilation policy [v4]
Vladimir Kozlov
kvn at openjdk.java.net
Fri Jan 22 18:22:08 UTC 2021
On Fri, 22 Jan 2021 15:19:39 GMT, Igor Veresov <iveresov at openjdk.org> wrote:
>> src/hotspot/share/compiler/compilerDefinitions.hpp line 234:
>>
>>> 232: static bool is_interpreter_only() {
>>> 233: return Arguments::is_interpreter_only() || TieredStopAtLevel == CompLevel_none;
>>> 234: }
>>
>> Can you move these functions after has_*() functions? They are used before.
>
> Right now has_() functions are defined before uses. Do you want them to be after the uses? Please confirm.
Don't touch has_() - they are in correct place. I am asking only to move these 4 is_() functions between has_() and is_c1_only() function.
>> src/hotspot/share/compiler/compilerDefinitions.hpp line 243:
>>
>>> 241: static bool is_c1_only_no_aot_or_jvmci() {
>>> 242: return is_c1_only() && !is_aot() && !is_jvmci();
>>> 243: }
>>
>> These names are a little confusing: what about C2, why only no AOT and JVMCI. I understand that you want to check if JVMCI or AOT can install their compiled code.
>> May be `is_c1_nmethods_only`, `is_c1_nmethods_or_interpreter_only` ?
>
> I guess it's a matter of naming convention. What I tried to make the CompilerConfig API about is to check if compilers are present/enabled and in which combination. Of course presence of a compiler implies that we're going to see nmethod produced by it. I'd like to keep the current naming if it's not a huge eyesore for you.
Hmm, may be we don't need these funxctions.
Seems is_c1_only() will be true only when JVMCI is off. Right? We can also reinforce it to exclude AOT too.
And AOT and JVMCI are disabled with -Xint.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1985
More information about the hotspot-compiler-dev
mailing list