RFR: 8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache [v3]
Ioi Lam
iklam at openjdk.org
Thu May 8 03:01:51 UTC 2025
On Thu, 8 May 2025 01:34:51 GMT, David Holmes <dholmes at openjdk.org> wrote:
> This PR seems to be combining a few things:
>
> * establishing the "aliasing" mechanism
> * changing some logging statements from CDS to AOT (which already has its own JBS issue IIRC)
The logs that are changed are of the pattern `cds+aot+link`. UL cannot accept `aot+aot+link`:
$ java -Xlog:aot+aot --version
[0.000s][error][logging] Log selection contains duplicates of tag aot.
Invalid -Xlog option '-Xlog:aot+aot', see error log for details.
Therefore, these logs must be changed, or else they cannot be accessed using the `-Xlog:aot` alias. I didn't change any other cds logs.
> * adding new configuration error checking
Do you mean the changes in filemap.cpp? I've reverted them.
> It may be cleaner to keep these distinct.
>
> I'm also wondering whether we can have a more direct, and general-purpose, aliasing mechanism, that simply connects two tags as aliases such that enabling one enables the other and changes it's printed name? That would be less intrusive than putting this AOT specific logic (which is still an experiment/preview feature isn't it?) into the UL code.
I am not sure if we want a general-purpose, aliasing mechanism. I think it will just be confusing for both HotSpot developers and users.
I see this exercise as a one off -- a long time feature that gets a new name. Once the -Xlog:cds logs are all removed, this aliasing mechanism (a dozen or so lines of code) will be completely removed.
AOT is not an experiment/preview feature. It's a product feature in JEP 483 which was introduced in JDK 24.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24895#issuecomment-2861468570
More information about the hotspot-runtime-dev
mailing list