On Tue, 31 Mar 2026 16:59:30 GMT, Paul Hübner <[email protected]> wrote:

>> Hi all, 
>> 
>> This change eliminates more box cache usages when running with 
>> `--enable-preview`:
>> * The majority of the change is contributed by @xmas92 who disabled CDS 
>> loading an archived cache.
>> * There's an autobox cache cast in C2 that needed to be disabled.
>> 
>> Notably, this change does not prevent the `XXXCache`'s `cache` variables 
>> from being CDS archived. This is due to the fact that the infrastructure is 
>> common to preview and non-preview mode, and the code complexity is not 
>> justifiable when the cost is storing five `null`s.  Instead, it is ensured 
>> that the cache is never read from.
>> 
>> Testing: tiers 1-4.
>
> Paul Hübner has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Reviewer feedback.

Changes requested by iklam (Committer).

src/hotspot/share/cds/heapShared.cpp line 1933:

> 1931:     assert(strcmp("archivedCache", field_name) != 0 ||
> 1932:            !Arguments::is_valhalla_enabled(),
> 1933:            "field %s must be null when using Valhalla preview 
> features", field_name);

I think this assert should be removed. Even though the field name 
`archivedCache` is currently used only for the number classes, this just 
happens to be a coincident.

-------------

PR Review: 
https://git.openjdk.org/valhalla/pull/2249#pullrequestreview-4039703713
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2249#discussion_r3017976820

Reply via email to