RFR: 8376822: UseCompactObjectHeaders: fill Klass alignment gaps in AOT cache [v3]
Ashutosh Mehra
asmehra at openjdk.org
Fri Feb 27 14:46:41 UTC 2026
On Thu, 26 Feb 2026 16:58:54 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - @lmesnik comment: added test case
>> - @johan-sjolen comments
>
> src/hotspot/share/cds/archiveUtils.cpp line 371:
>
>> 369: #endif
>> 370:
>> 371: if (alignment == SharedSpaceObjectAlignment && type != MetaspaceClosureType::SymbolType) {
>
> Since the gaps are in rw region only, shouldn't we use the gaps only when `read_only` is false?
Another way to avoid storing `read_only` objects in `rw` region gaps, assuming we want to do that, would be to have a `_gap_tree` as an instance field in each `DumpRegion`. It would be nullptr for every region other than `rw` region. And then `allocate_metaspace_obj` would attempt to allocate in gaps only if `_gap_tree` is not null.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29869#discussion_r2864674321
More information about the hotspot-dev
mailing list