RFR: 8356998: Convert -Xlog:cds to -Xlog:aot (step 2) [v4]

Calvin Cheung ccheung at openjdk.org
Mon May 19 21:53:53 UTC 2025


On Thu, 15 May 2025 03:10:37 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> This is the second step that follows #25136. Most of the changes are mechanical.
>> 
>> - Compatible Logs are changed to `aot_log_xxx(aot, ...)`
>> - All other logs are changed to `log_xxx(cds, ...)`
>> 
>> All `-Xlog:cds` logs are converted, except for `-Xlog:cds+dynamic`, because:
>> 
>> - Dynamic archive is supported only in the old CDS workflow. It's not supported in the new AOT workflow.
>> - Changing it to `-Xlog:aot+dynamic` is inappropriate. Perhaps we should change it to `-Xlog:aot+cds+dynamc+archive`. However, that will affect a lot of test cases. We'll leave this for JDK 26.
>> 
>> 
>> Additional changes:
>> 
>> - There are some changes in the test cases to match the new log output.
>> - I also changed a few log messages when the distinction of "shared archive" vs "AOT cache" is significant.
>> - Makefile change for `-Xlog:cds+map` -> `-Xlog:aot+map`
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed one missed log_info(cds)

Looks good. Just a few nits.

src/hotspot/share/cds/archiveUtils.cpp line 282:

> 280: void DumpRegion::print_out_of_space_msg(const char* failing_region, size_t needed_bytes) {
> 281:   aot_log_error(aot)("[%-8s] " PTR_FORMAT " - " PTR_FORMAT " capacity =%9d, allocated =%9d",
> 282:                  _name, p2i(_base), p2i(_top), int(_end - _base), int(_top - _base));

Please fix the indentation of line 282.

test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java line 78:

> 76:                     "-Xlog:gc,cds+class=debug",
> 77:                     "-XX:AOTInitTestClass=MethodHandleTestApp",
> 78:                   //"-Xlog:aot+map,aot+map+oops=trace:file=cds.oops.txt:none:filesize=0",

Why is this commented out?

test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java line 92:

> 90:                     "-Xlog:gc,cds+class=debug",
> 91:                     "-XX:AOTInitTestClass=" + mainClass,
> 92:                   //"-Xlog:aot+map,aot+map+oops=trace:file=cds.oops.txt:none:filesize=0",

Why is this commented out?

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

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25238#pullrequestreview-2852055351
PR Review Comment: https://git.openjdk.org/jdk/pull/25238#discussion_r2096533484
PR Review Comment: https://git.openjdk.org/jdk/pull/25238#discussion_r2096526399
PR Review Comment: https://git.openjdk.org/jdk/pull/25238#discussion_r2096525200


More information about the hotspot-dev mailing list