-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache #24895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache #24895
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
@@ -21,6 +21,8 @@ | |||
* questions. | |||
* | |||
*/ | |||
|
|||
#include "cds/cds_globals.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe wrap this include in INCLUDE_CDS
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap this in INCLUDE_CDS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i ++; | |
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:
-Xlog
options that starts with theaot
tag should also match anyLogTagSets
whose first tag isLogTag::_cds
LogTagSet
whose first tag isLogTag::_cds
, if itstags
decoration 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
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24895/head:pull/24895
$ git checkout pull/24895
Update a local copy of the PR:
$ git checkout pull/24895
$ git pull https://git.openjdk.org/jdk.git pull/24895/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24895
View PR using the GUI difftool:
$ git pr show -t 24895
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24895.diff
Using Webrev
Link to Webrev Comment