RFR: 8276711: compiler/codecache/cli tests failing when SegmentedCodeCache used with -Xint
David Holmes
dholmes at openjdk.java.net
Tue Mar 1 23:23:12 UTC 2022
On Tue, 1 Mar 2022 23:12:29 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> I replied on email but I don't see it and this is better here. I should really change this to be:
>>
>> if (FLAG_IS_CMDLINE(SegmentedCodeCache)) {
>> }
>> Since this code is checking for someone setting it on the command line with -Xint. The code in compilerDefinitions.cpp sets the flag ergonomically if the code cache is big and if tiered compilation is on. I believe this is after the code in arguments.cpp. So this code won't reset it to true, if I'm following it right.
>> edit: yes, I'll check the flag in compilerDefinitions.cpp.
>
> I agree that the warning should be issued if flag is set on command line together with `-Xint`.
> In this case you need add this check to `CompilerConfig::check_args_consistency()` where different compiler flags are set to false when we run with Interpreter:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L493
Thanks Coleen, seems the use of `set_mode_flags` is somewhat flawed as you can change any of the flags that it tries to force on/off simply by having them later on the command-line.
You could do as @vnkozlov suggests and move this check into `compilerDefinitions.cpp` as `CompilerConfig::ergo_initialize()` is called just a few lines above this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7650
More information about the hotspot-dev
mailing list