RFR: 8358738: AOT cache created without graal jit should not be used with graal jit [v2]

Vladimir Kozlov kvn at openjdk.org
Fri Jun 13 15:53:31 UTC 2025


On Fri, 13 Jun 2025 15:15:26 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address comments
>
> Looks good. I have one question.

Thank you @calvinccheung for review.

> src/hotspot/share/cds/filemap.cpp line 1952:
> 
>> 1950:                             (compiler_type == CompilerType::compiler_none);
>> 1951:   if (!intepreter_is_used &&
>> 1952:       jvmci_compiler_is_enabled != (archive_compiler_type == CompilerType::compiler_jvmci)) {
> 
> Does it mean we allow different compiler type during assembly phase and production phase? e.g. assembly phase using c1, production phase using c2?

Yes. By default we have both with TieredCompilation. But we can switch it off (C2 only) or use TieredStopAtLevel=1 (C1 only). When they are mixed (one phase use only C1 and an other C2) we simple will not load AOT nmethods because corresponding compiler's runtime stubs will not be created so we can't use AOT nmethods referencing these stubs. But nothing in code generation or methods profiling prevents us from mixing them.

On other hand Graal creates different profiling data and additional nmethod's metadata. So we can't use such data with other JIT compilers.

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

PR Comment: https://git.openjdk.org/jdk/pull/25782#issuecomment-2970809429
PR Review Comment: https://git.openjdk.org/jdk/pull/25782#discussion_r2145398615


More information about the hotspot-runtime-dev mailing list