RFR: 8366905: Store AdapterBlob pointer in AdapterHandlerEntry

Ashutosh Mehra asmehra at openjdk.org
Fri Sep 5 19:30:27 UTC 2025


On Thu, 4 Sep 2025 14:49:48 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

> This PR removes the need to store entry point addresses in AdapterHandlerEntry by storing a direct pointer to AdapterBlob instead. Entry point addresses can be computed on the fly from the entry point offsets stored in AdapterBlob.

@adinn @shipilev I am finding it a bit challenging to handle zero configuration with this change. Now that the AdapterHandlerEntry has only a pointer to AdapterBlob, it is not possible to use `zero_null_code_stub` address as the i2c and c2i entry points. If the AdapterBlob is null, then the getter methods for entry points in AdapterHandlerEntry return nullptr. See `get_i2c_entry`, `get_c2i_entry` in `sharedRuntime.hpp`. And we stopped creating AdapterBlob for the AdapterHandlerEntry.
So the question is: for zero does it matter if we return `zero_null_code_stub` or nullptr? I remember at one point @shipilev was returning `nullptr` as the c2i entry address in one of the PR (https://github.com/openjdk/jdk/pull/26746)

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

PR Comment: https://git.openjdk.org/jdk/pull/27101#issuecomment-3254137764


More information about the hotspot-dev mailing list