RFR: 8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache [v6]
Ioi Lam
iklam at openjdk.org
Thu May 8 18:30:52 UTC 2025
On Thu, 8 May 2025 16:15:07 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> This seems like a hack in the UL system. Did you consider confining this in the CDS / AOT code instead?
>
> Something like this pseudo code:
>
> ```
> bool aot_log_is_enabled(Level, ...) {
> return log_is_enabled(Level, aot, link) ||
> log_is_enabled(Level, cds, link);
> }
> void aot_log_info(...) {}
> ...
> if (aot_log_is_enabled(Info, link) {
> ResourceMark rm;
> aot_log_info(link)("%s %s %p", class_category_name(ik), ik->external_name(), ik);
> }
> ```
OK I'll try that. I think most `cds` logs are obscure and can be changed to `aot`. I'll implement a few macros for the style you suggested above, and use them on the "user facing" logs -- e.g, those that report errors for trouble shooting purposes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24895#issuecomment-2863912652
More information about the hotspot-runtime-dev
mailing list