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

Roman Kennke rkennke at openjdk.org
Wed May 10 16:23:31 UTC 2023


On Wed, 10 May 2023 10:00:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Allow to resolve mark with LW locking
>
> 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.

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

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


More information about the hotspot-dev mailing list