On Thu, 16 Apr 2026 10:03:05 GMT, Roman Kennke <[email protected]> wrote:

>> This change makes UseCompactObjectHeaders default and switches the sense of 
>> the CDS archive naming.  Now classes.jsa is with UseCompressedOops + 
>> UseCompactObjectHeaders (both default).  Then theres:
>> classes_nocoops.jsa
>> classes_nocoh.jsa
>> classes_nocoops_nocoh.jsa
>> 
>> Hopefully someday we won't need the nocoh versions.
>> 
>> Tested with tier1-8.  With only one issue also fixed in this change, and no 
>> other new issues found.
>> 
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/hotspot/share/cds/cdsConfig.cpp line 143:
> 
>> 141:     }
>> 142:     if (!UseCompactObjectHeaders) {
>> 143:       // Note that generation of xxx_coh.jsa variants require
> 
> Also fix the comment? There is no _coh variant anymore.

There is a _nocoh version and I didn't reverse the logic in 
autoconf/jdk-options.m4.  So I fixed the comment to refer to nocoh instead.

> src/hotspot/share/runtime/arguments.cpp line 3786:
> 
>> 3784:     // If UseCompactObjectHeaders is on the command line, turn on 
>> UseObjectMonitorTable.
>> 3785:     if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
>> 3786:       if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
> 
> I think this should not be inside if 
> (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) { .. }. Even if UCOH is not 
> specified at all, we want to warn when somebody tries to turn UOMT off. Right?

Maybe yes, I was thinking if someone just had -XX:-UseObjectMonitorTable 
without also specifying -XX:-UseCompactObjectHeaders, they should just get UCOH 
turned off, but this would only be for out testing, and not a real user, and we 
can fix our testing.

> src/hotspot/share/runtime/arguments.cpp line 3792:
> 
>> 3790: 
>> 3791:       // If UseObjectMonitorTable is on the command line, turn off 
>> UseCompactObjectHeaders.
>> 3792:     } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
> 
> And then this branch would be unnecessary.

That does simplify things a lot.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30322#discussion_r3093033716
PR Review Comment: https://git.openjdk.org/jdk/pull/30322#discussion_r3093053742
PR Review Comment: https://git.openjdk.org/jdk/pull/30322#discussion_r3093090968

Reply via email to