RFR: 8366905: Store AdapterBlob pointer in AdapterHandlerEntry [v2]

Ashutosh Mehra asmehra at openjdk.org
Fri Sep 19 14:58:01 UTC 2025


On Thu, 18 Sep 2025 23:47:21 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Ashutosh Mehra has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'master' into store-blob-pointer-adapterhandlerentry-v2
>>  - Remove unused method and change numeric constants to enums
>>    
>>    Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
>>  - Address review comments
>>    
>>    Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
>>  - Do not call generate_i2c2i_adapters() on zero
>>    
>>    Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
>>  - Store pointer to AdapterBlob in AdapterHandlerEntry
>>    
>>    Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
>
> Good. Few comments only

@vnkozlov addressed your comments and merged master as well.

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

This was just copied from the existing code. I think we don't need it. We should always be using enums.

> 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()`

Done

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

PR Comment: https://git.openjdk.org/jdk/pull/27101#issuecomment-3312523843
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2363174214
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2363176991


More information about the hotspot-dev mailing list