8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache#24895
8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache#24895iklam wants to merge 18 commits intoopenjdk:masterfrom
Conversation
c32b6f7 to
8ed2bf5
Compare
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
@iklam This change is no longer ready for integration - check the PR body for details. |
…w workflow; added PrintCDSLogsAsAOTLogs diagnostic flag
| * | ||
| */ | ||
|
|
||
| #include "cds/cds_globals.hpp" |
There was a problem hiding this comment.
Maybe wrap this include in INCLUDE_CDS as well?
There was a problem hiding this comment.
We usually don't put includes around cds header files (there are lots of them). These header are compatible whether INCLUDE_CDS is enabled or not.
Webrevs
|
| if (PrintCDSLogsAsAOTLogs && _ntags > 0 && _tags[0] == LogTag::_aot && ts.tag(0) == LogTag::_cds) { | ||
| // Consider it a match | ||
| i ++; | ||
| } |
There was a problem hiding this comment.
Wrap this in INCLUDE_CDS.
vnkozlov
left a comment
There was a problem hiding this comment.
I found typo UL ouput in filemap.cpp: arrow_klass_pointer_bits
|
@iklam this pull request can not be integrated into git checkout 8355638-xlog-aot-as-alias-for-xlog-cds
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
There was a problem hiding this comment.
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)
- adding new configuration error checking
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.
| #if INCLUDE_CDS | ||
| if (PrintCDSLogsAsAOTLogs && _ntags > 0 && _tags[0] == LogTag::_aot && ts.tag(0) == LogTag::_cds) { | ||
| // Consider it a match | ||
| i ++; |
The logs that are changed are of the pattern Therefore, these logs must be changed, or else they cannot be accessed using the
Do you mean the changes in filemap.cpp? I've reverted them.
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. |
|
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: |
OK I'll try that. I think most |
@stefank @jdksjolen could you check out #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 |
Personally, I was fine with a temporary hack. Now, we do have a 'proper' solution, so let's go with that. |
Specification:
When the JVM is started with any of the following options: AOTCache, AOTCacheOutput, AOTConfiguration, AOTMode:
-Xlogoptions that starts with theaottag should also match anyLogTagSetswhose first tag isLogTag::_cdsLogTagSetwhose first tag isLogTag::_cds, if itstagsdecoration is to be printed, then the first tag in the decoration should be printed asaot.Examples:
Control case -- this is an example of an old "cds" log. The decoration should be printed as "cds" to be backwards compatible
"aot" can be used to select the "cds" log, but the log will be printed with "aot" as its decoration
When using new -XX:AOT flags, even if you specify -Xlog:cds, the output will use "aot" decoration
When using new -XX:AOT flags, error messages should be logged with "aot" decoration even when no -Xlog flags are specified
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24895/head:pull/24895$ git checkout pull/24895Update a local copy of the PR:
$ git checkout pull/24895$ git pull https://git.openjdk.org/jdk.git pull/24895/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24895View PR using the GUI difftool:
$ git pr show -t 24895Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24895.diff
Using Webrev
Link to Webrev Comment