RFR: 8365558: Fix stub entry init and blob creation on Zero [v2]
Andrew Dinn
adinn at openjdk.org
Fri Aug 15 11:02:26 UTC 2025
On Thu, 14 Aug 2025 19:26:32 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Andrew Dinn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>>
>> - set zero stubgen blob sizes to zero
>> - restore error traps for zero adapter handle c2i entries
>> - Merge branch 'master' into JDK-8365558
>> - avoid creating AdpaterBlobs on Zero where we cannto use them
>> - Execute stubgen stub create functions even on Zero when no code expected
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 2806:
>
>> 2804: // on Zero the blob may be null
>> 2805: handler->print_adapter_on(tty);
>> 2806: if (adapter_blob == nullptr) {
>
> Should we move `handler->print_adapter_on(tty);` too after check?
We still have a handler entry even if we don't have a blob. So I left this in to display the handler entry addresses i.e. C functions not blob entries.
> src/hotspot/share/runtime/stubRoutines.cpp line 198:
>
>> 196: ls.print_cr("%s\t not generated", buffer_name);
>> 197: return nullptr;
>> 198: }
>
> Wrong placement of `return nullptr;`
This is for the case where the blob size is declared as zero in stubDeclarations.hpp. That means we don't need a blob. So, in that case I think we need to do assert that no code was generated, skip the blob creation and return nullptr.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26787#discussion_r2278791917
PR Review Comment: https://git.openjdk.org/jdk/pull/26787#discussion_r2278794805
More information about the hotspot-dev
mailing list