RFR: 8367406: Simple refactoring AOTCodeAddressTable::id_for_address
Francesco Andreuzzi
fandreuzzi at openjdk.org
Thu Sep 11 11:07:34 UTC 2025
On Thu, 11 Sep 2025 10:42:48 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Hi,
> Can you help to review this simple refactoring?
>
> AOTCodeAddressTable::id_for_address currently is implemented in a way that introduce too many nested if/else, seems we could make the code more readable by removing these nested if/else. But it's quite subjective, so I'll let you tell if the patch is helpful.
>
> Run tests (test/hotspot/jtreg/runtime/cds/appcds/aot*), no new failures on x64.
>
> Thanks!
src/hotspot/share/code/aotCodeCache.cpp line 1685:
> 1683: desc = StubCodeDesc::desc_for(addr + frame::pc_return_offset);
> 1684: }
> 1685: const char* sub_name = (desc != nullptr) ? desc->name() : "<unknown>";
This seems to be used only in the assertion, maybe it could be hidden behind a `#ifdef ASSERT`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27217#discussion_r2340199165
More information about the hotspot-compiler-dev
mailing list