RFR: 8365558: Fix stub entry init and blob creation on Zero [v2]

Vladimir Kozlov kvn at openjdk.org
Fri Aug 15 15:02:14 UTC 2025


On Fri, 15 Aug 2025 10:55:21 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> 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.

Okay. I see that it prints handlers's addresses and fingerprint.

>> 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.

I mean, currently `return` is under `if (lt.is_enabled())` condition. It should be outside it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26787#discussion_r2279146670
PR Review Comment: https://git.openjdk.org/jdk/pull/26787#discussion_r2279149076


More information about the hotspot-dev mailing list