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
Fri May 9 04:00:52 UTC 2025


On Thu, 8 May 2025 18:27:51 GMT, Ioi Lam <iklam 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.

@stefank @jdksjolen could you check out https://github.com/openjdk/jdk/pull/25136 for the new approach?

That PR has much more changes than this PR, but we need to change those eventually anyway to complete the `[cds]` to `[aot]` transition.

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

PR Comment: https://git.openjdk.org/jdk/pull/24895#issuecomment-2865016262


More information about the hotspot-runtime-dev mailing list