RFR: 8356595: Convert -Xlog:cds to -Xlog:aot [v4]
David Holmes
dholmes at openjdk.org
Wed May 14 03:57:52 UTC 2025
On Wed, 14 May 2025 01:07:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> This is an alternative (and opposite) approach to https://github.com/openjdk/jdk/pull/24895. We basically convert most `[cds]` logs to `[aot]` logs. However, for the few logs that might be needed by existing user scripts, we use macros like `aot_log_info`, `aot_log_debug` so that they can be selected/printed using the `[cds]` tag.
>>
>> We have a few hundred logs that start with `[cds]`. To aid reviewing, this PR will convert only part of them. I will create a second PR that coverts the rest of the logs.
>>
>> Please see **aotLogging.hpp** for how the macros work.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed PrintAOTLogsAsCDSLogs and improved comments
Thanks for getting rid of the flag and for explaining the longer term plans. This is all making a lot more sense to me now.
But given you state that CDS is a subset of AOT - the AOT for metaspace - does it really make sense to simply rebadge "cds" logging as "aot"? It seems to me that "aot" logging will generate massive amounts of data if everything AOT related logs when "aot" is used. Would you not want finer-grained logging such that "cds" becomes "aot+metaspace" as described?
I'm undecided whether this aspect of the work requires a CSR request ... but it never hurts to have one. Obviously in 26 there will be one for the actual deprecation/obsoletion/expiration process.
src/hotspot/share/cds/aotLogging.hpp line 63:
> 61: // The messages printed with the log_aot_xxx() macros work as if they are
> 62: // using the [cds] tag when running with the "classic" CDS flags such as
> 63: // -XX:SharedArchiveFile:
What if you specify no flags and rely on the implicit settings e.g. `-Xshare:auto`, will `-Xlog:cds` continue to work as today?
-------------
PR Review: https://git.openjdk.org/jdk/pull/25136#pullrequestreview-2838631912
PR Review Comment: https://git.openjdk.org/jdk/pull/25136#discussion_r2087973430
More information about the hotspot-dev
mailing list