RFR: 8367406: Simple refactoring AOTCodeAddressTable::id_for_address
Andrew Dinn
adinn at openjdk.org
Thu Sep 11 13:13:27 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!
I'm not convinced this is making anything simpler. Also, it is diverging from the code we have in the Leyden repo which caters for further cases.
If this code does merit a cleanup (which I agree is the case) the that should really wait until we have
1. folded in cases currently catered for in Leyden premain that deal with translation of stub addresses
2. worked out a better way of managing addresses than the current use of several ad hoc bucket lists
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27217#issuecomment-3280585779
More information about the hotspot-compiler-dev
mailing list