RFR: 8358690: Some initialization code asks for AOT cache status way too early

Andrew Dinn adinn at openjdk.org
Thu Jun 12 17:01:29 UTC 2025


On Thu, 12 Jun 2025 13:49:59 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> I found that `StubRoutines::_fence_entry` from initial stubs is used by [OrderAccess::fence()](https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/windows_x86/orderAccess_windows_x86.hpp#L50) on Windows-x64 and only. And `OrderAccess::fence()` is used by GC worked threads which are started by `universe_init()`.
>> 
>> I am work on fixing it. I hope I don't need to move all initial stubs. May be 'pre-initial` stubs for this?
>
>> @vnkozlov Are you suggesting moving the fence stubs to a separate StubGen preinitial blob created before the initial blob? That should be relatively easy to do.
>> 
>> If you want me to push that change first in a separate PR I will be happy to do so.
> 
> Yes, please.  There could be other stubs we need very early which we can exclude from AOTing. May be call it `pre-universe` to be clear.
> 
> My only concern is the fence stub is used only by windows-x86. Introducing whole new stubs type for that is overkill IMHO. But on other hand, we may need such type later for other new stubs. Or we find later that some initial stubs still be needed before `universe_init`.

@vnkozlov I have raised [JDK-8359373](https://bugs.openjdk.org/browse/JDK-8359373) and have a PR in progress.

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

PR Comment: https://git.openjdk.org/jdk/pull/25763#issuecomment-2967586583


More information about the hotspot-dev mailing list