RFR: 8366905: Store AdapterBlob pointer in AdapterHandlerEntry [v3]
Ashutosh Mehra
asmehra at openjdk.org
Mon Sep 22 20:01:06 UTC 2025
On Mon, 22 Sep 2025 10:46:09 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> src/hotspot/share/runtime/sharedRuntime.hpp line 736:
>>
>>> 734: }
>>> 735:
>>> 736: address get_i2c_entry() const { return _adapter_blob != nullptr ? _adapter_blob->i2c_entry() : nullptr; }
>>
>> Should these getters assert `_adapter_blob != nullptr`?
>> I think we should only ever have an AdapterHandlerEntry with a null blob on ZERO and in that case an attempt to use the entry would be invalid.
>
> n.b. I guess that would require modifying `print_adapter_on` to check the adapter blob and avoid calling the entry lookup methods/printing the entry address details. It normally gets called when we have a known entry address as a starting point to look up an adapter handle but it is also called from `print_adapter_handler_info` when we may have a handler with a null blob.
> I updated the code to add the assert for non ZERO builds
Should these getters assert _adapter_blob != nullptr?
Also updated `print_adapter_on` to do a null check on adapter_blob.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2370148096
More information about the hotspot-dev
mailing list