RFR: 8351871: Disable JIT compiler when dumping AOT cache with -XX:+AOTClassLinking
John R Rose
jrose at openjdk.org
Wed Mar 12 20:58:53 UTC 2025
On Wed, 12 Mar 2025 20:06:15 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Since [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), when creating the AOT cache with -XX:AOTMode=create, at the very end of normal Java execution, right before we enter the safepoint VM_PopulateDumpSharedSpace, we reset the states of a few Java objects.
>
> Such reset operations can cause the JIT to observe inconsistent states.
>
> While working on a proper fix, this PR is a work-around that disable the JIT during AOT cache creation.
Is there a global flag we can check that says when object-editing has started? It's at the very end of AOT assembly phase, so it should be false for some of the time, and later true. Just as the JIT is locked out of the earliest boot-up phases of the VM, we should think about locking it out of the last shut-down phases, including the dump operation at the end of the AOT assembly phase.
We really need some cleanups and extensions in the java.lang.System boot-level logic.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24019#issuecomment-2719108707
More information about the hotspot-runtime-dev
mailing list