RFR: 8358738: AOT cache created without graal jit should not be used with graal jit
Ioi Lam
iklam at openjdk.org
Thu Jun 12 21:17:28 UTC 2025
On Thu, 12 Jun 2025 14:24:25 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> We can't mix generation and usage of AOT cache when different JIT compilers are used (C2 vs Graal). Graal does different profiling settings and generate different code. We can only allow mix with Interpreter.
>
> Record used compiler type in archive and check it when using archive.
>
> Tested with tiers which use Graal.
Looks good. Suggestions for code clean up and inline comments.
src/hotspot/share/cds/filemap.cpp line 1956:
> 1954: } else if (CompilerConfig::is_c1_enabled()) {
> 1955: compiler_type = CompilerType::compiler_c1;
> 1956: }
This block of code should be put in a method in CompilerConfig to avoid duplication.
src/hotspot/share/cds/filemap.cpp line 1958:
> 1956: }
> 1957: CompilerType archive_compiler_type = CompilerType(_compiler_type);
> 1958: // JVMCI compiler loads additional jdk.internal.vm.ci module,
Since [JDK-8345826](https://github.com/openjdk/jdk/commit/81536830ed096005c4f09ab446238ce50989cea9), the jdk.internal.vm.ci module is no longer added when libgraal is used. I think you can remove this line from the comments. Incompatible module options are checked elsewhere in modules.cpp.
-------------
Changes requested by iklam (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25782#pullrequestreview-2922663464
PR Review Comment: https://git.openjdk.org/jdk/pull/25782#discussion_r2143663959
PR Review Comment: https://git.openjdk.org/jdk/pull/25782#discussion_r2143668954
More information about the hotspot-runtime-dev
mailing list