RFR: 8338902: CDS flags are reported with wrong flag category

Aleksey Shipilev shade at openjdk.org
Mon Sep 9 11:59:09 UTC 2024


On Fri, 23 Aug 2024 11:26:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Noticed this little oddity when looking through Leyden crash reports:
> 
> 
> $ build/macosx-aarch64-server-fastdebug/images/jdk/bin/java -XX:+PrintFlagsFinal 2>&1 | grep ArchiveRelocationMode  
>       int ArchiveRelocationMode                    = 1                                {JVMCI diagnostic} {default}
> 
> 
> This is a flag from `cds_globals.hpp`, but it is reported as `JVMCI`. Depending on build, these flags seem to be attributed to different categories. I think this bug also skews all other flag categories, since we don't account for CDS flags being in the middle of the table here: https://github.com/openjdk/jdk/blob/916f1aa04f6fcc6da9bf9d725e3639cf4c0755a1/src/hotspot/share/runtime/flags/allFlags.hpp#L60-L66 The order in that table is important, since we have this matcher: https://github.com/openjdk/jdk/blob/916f1aa04f6fcc6da9bf9d725e3639cf4c0755a1/src/hotspot/share/runtime/flags/jvmFlag.cpp#L455-L478
> 
> My initial patch was to introduce the `CDS` category, but I think that is excessive. We can just move the CDS flags below the specialized flags, so they are reported as "other", i.e. without a category.
> 
> After the fix:
> 
> 
> % build/macosx-aarch64-server-fastdebug/images/jdk/bin/java -XX:+PrintFlagsFinal 2>&1 | grep ArchiveRelocationMode
>       int ArchiveRelocationMode                    = 1                                      {diagnostic} {default}

Thank you!

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

PR Comment: https://git.openjdk.org/jdk/pull/20692#issuecomment-2337920956


More information about the hotspot-runtime-dev mailing list