RFR: 8325132: CDS: Make sure the ArchiveRelocationMode is always printed in the log [v2]

Calvin Cheung ccheung at openjdk.org
Wed Mar 26 19:46:03 UTC 2025


On Wed, 26 Mar 2025 17:35:24 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> With ArchiveRelocationMode = 0
>> 
>> [0.042s][info][cds] ArchiveRelocationMode = 0
>> [0.042s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes
>> [0.042s][info][cds] Reserved class_space_rs   [0x0000000801000000 - 0x0000000841000000] (1073741824) bytes
>> [0.042s][info][cds] Mapped static  region #0 at base 0x0000000800000000 top 0x000000080055d000 (ReadWrite)
>> [0.042s][info][cds] Mapped static  region #1 at base 0x000000080055d000 top 0x0000000800e05000 (ReadOnly)
>> [0.042s][info][cds] _archived_main_module_name (null)
>> [0.042s][info][cds] jdk.module.main (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> [0.042s][info][cds] jdk.module.addmods (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> [0.042s][info][cds] jdk.module.enable.native.access (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> 
>> 
>> With ArchiveRelocationMode = 1
>> 
>> [0.042s][info][cds] ArchiveRelocationMode = 1
>> [0.042s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes
>> [0.042s][info][cds] Reserved class_space_rs   [0x0000000801000000 - 0x0000000841000000] (1073741824) bytes
>> [0.042s][info][cds] Mapped static  region #0 at base 0x0000000800000000 top 0x000000080055d000 (ReadWrite)
>> [0.042s][info][cds] Mapped static  region #1 at base 0x000000080055d000 top 0x0000000800e05000 (ReadOnly)
>> [0.042s][info][cds] _archived_main_module_name (null)
>> [0.042s][info][cds] jdk.module.main (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> [0.042s][info][cds] jdk.module.addmods (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> [0.042s][info][cds] jdk.module.enable.native.access (null)
>> [0.042s][info][cds] optimized module handling: enabled
>> [0.042s][info][cds] full module graph: enabled
>> [0.042s][info][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
>
> Yeah, it's just the logging line just 3 lines earlier says: `Core region alignment: %zu`, so maybe match that?

I've updated the fix based on your suggestion.
Now, the log looks as follows:

[0.042s][info][cds] Core region alignment: 4096
[0.042s][info][cds] ArchiveRelocationMode: 0
[0.042s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23878#discussion_r2014896128


More information about the hotspot-runtime-dev mailing list