RFR: 8366905: Store AdapterBlob pointer in AdapterHandlerEntry [v3]
Andrew Dinn
adinn at openjdk.org
Mon Sep 22 10:04:26 UTC 2025
On Fri, 19 Sep 2025 21:45:16 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.
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>
> Add missing ResourceMark
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
src/hotspot/share/code/codeBlob.cpp line 457:
> 455: (entry_offset[i] == -1),
> 456: "invalid entry offset[%d] = 0x%x", i, entry_offset[i]);
> 457: }
In the header the getters for the first 3 entries (i.e. entry_offset[I2C], entry_offset[C2I] and entry_offset[C2I_Unverified]) are all valid. So, we need to assert that as well as requiring the I2C entry being at offset 0.
Suggestion:
assert(entry_offset[I2C] == 0, "sanity check");
for (int i = 1; i < AdapterBlob::ENTRY_COUNT; i++) {
// The entry is within the adapter blob or, in the case of the last one, unset.
int offset = entry_offset[i];
assert((offset > 0 && offset < cb->insts()->size()) ||
(i >= C2I_No_Clinit_Check && offset == -1),
"invalid entry offset[%d] = 0x%x", i, entry_offset[i]);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27101#discussion_r2367392909
More information about the hotspot-dev
mailing list