RFR: 8377307: Refactor code for AOT cache pointer compression [v2]
Ashutosh Mehra
asmehra at openjdk.org
Mon Feb 9 21:25:05 UTC 2026
On Sat, 7 Feb 2026 04:07:27 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> AOT cache uses pointer compression to store 64-bit pointers in 32 bits. Currently the compression algorithm is simply (base + narrowPtr). However, in [JDK-8376125](https://bugs.openjdk.org/browse/JDK-8376125), we may change it to (base + narrowPtr << 3).
>>
>> This RFE changed the encoded pointer from an u4 to (thanks to @jdksjolen for the idea):
>>
>>
>> enum class narrowPtr : u4;
>>
>>
>> This allows better tracking of where the encoded pointers are stored. Also, we can distinguish between byte offsets vs encoded pointers -- they currently have the same numerical values but after [JDK-8376125](https://bugs.openjdk.org/browse/JDK-8376125), they will be different.
>>
>> Also minor clean up in ArchiveBuilder to change some `uintx` to `size_t`, which is used by `pointer_delta()`.
>
> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>
> - restored assert
> - @jdksjolen review comments
looks good.
-------------
Marked as reviewed by asmehra (Committer).
PR Review: https://git.openjdk.org/jdk/pull/29590#pullrequestreview-3766197738
More information about the serviceability-dev
mailing list