RFR: 8355319: Update Manpage for Compact Object Headers (Production)
Roman Kennke
rkennke at openjdk.org
Tue Jun 3 07:04:55 UTC 2025
On Tue, 3 Jun 2025 00:32:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Adds an entry for -XX:+UseCompactObjectHeaders in the manpage for the java command, under 'Advanced runtime options'.
>
> src/java.base/share/man/java.md line 1026:
>
>> 1024: : Enables compact object headers. By default, this option is disabled.
>> 1025: Enabling this option reduces memory footprint in the Java heap by
>> 1026: 4 bytes per object (on average).
>
> The options are (with 3 exceptions) in alphabetical order - please move this to where the other `UseXXX` flags are.
>
> This does not explain at all why someone would want to use, or not use, COH. What are the trade-offs for turning it on? Please explain the usage.
I put it there because @coleenp said in the JBS issue: "Since UseCompactObjectHeaders seems more useful than some of the other options in the list (except the JFR and NMT options), I think it should go first." - I can move it down, though.
I don't know what you mean by 'This does not explain at all why someone would want to use, or not use, COH' - I explain right there "Enabling this option reduces memory footprint in the Java heap by 4 bytes per object (on average)." Is this not enough? There is no trade-off (loss of performance or any such issue would be considered a bug, tbh).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25491#discussion_r2122911362
More information about the hotspot-runtime-dev
mailing list