RFR: 8366905: Store AdapterBlob pointer in AdapterHandlerEntry

Vladimir Kozlov kvn at openjdk.org
Thu Sep 18 23:50:20 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.

Good. Few comments only

src/hotspot/share/runtime/sharedRuntime.cpp line 2825:

> 2823:   int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed);
> 2824:   address entry_address[AdapterBlob::ENTRY_COUNT];
> 2825:   assert(AdapterBlob::ENTRY_COUNT == 4, "sanity");

Why you need this assert? Do you use `4` instead of `ENTRY_COUNT` somewhere?

src/hotspot/share/runtime/sharedRuntime.cpp line 3034:

> 3032: #endif // INCLUDE_CDS
> 3033: 
> 3034: address AdapterHandlerEntry::base_address() {

This method is used in `print_adapter_handler_info()` only after removal of `relocate()`.
Consider using `adapter_blob->content_begin()` in  `print_adapter_handler_info()` and remove this `base_address()`

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

PR Review: https://git.openjdk.org/jdk/pull/27101#pullrequestreview-3242329072
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2361367345
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2361392408


More information about the hotspot-dev mailing list