RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) [v3]

Aleksey Shipilev shade at openjdk.org
Thu May 11 09:30:50 UTC 2023


On Wed, 10 May 2023 16:20:18 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/share/runtime/arguments.cpp line 3120:
>> 
>>> 3118: 
>>> 3119: #ifdef _LP64
>>> 3120:   if (!FLAG_IS_DEFAULT(UseCompactObjectHeaders)) {
>> 
>> Just `if (UseCompactObjectHeaders)`, or do I miss something?
>
> I've done this on purpose.
> When the default for UseCompactObjectHeaders is false, then CDS archives will be written with legacy headers, and we could not read this when running with +UseCompactObjectHeaders.
> When the default for UseCompactObjectHeaders is true, then CDS archives will be written with compact headers, and we could not read this when running with -UseCompactObjectHeaders.
> I (and others) are changing the default of this flag regularily for testing, because that also catches tests that require flagless, and the way this is written, would not require changing this line in arguments.cpp too.
> 
> I guess it would be even more useful if we could detect which setting of the flag has been used when writing a CDS archive, and don't read it if it's not compatible.
> 
> It would be *even* better, if we could detect the setting of the flag when archive has been written, and transform it into whatever the JVM is running with, but that would be too much to ask for this PR, I think.

OK, I see. This makes sense.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1190894761


More information about the hotspot-dev mailing list