-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8075816: Deprecate AliasLevel flag since it is broken #8140
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
Conversation
👋 Welcome back tobiasholenstein! A progress list of the required criteria for merging this PR into |
@tobiasholenstein The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
/csr needed |
@tobiasholenstein this pull request will not be integrated until the CSR request JDK-8284515 for issue JDK-8075816 has been approved. |
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 to me.
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.
I would like to have full description about the issue. The flags has values range [0-3]. Which values are broken? Which default value will be after flags removal and why?
src/hotspot/share/opto/compile.cpp
Outdated
if (!do_escape_analysis() && aliaslevel == 3) { | ||
aliaslevel = 2; // No unique types without escape analysis | ||
} | ||
_AliasLevel = aliaslevel; |
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.
Please, test with EA switched off -XX:-DoEscapeAnalysis
There are tests which switch it off. Also it is off in tier7 and tier8 for compiler tests. So I am puzzled that bug say that it crash with aliasLevel=2
.
Also update subject of PR to match new bug's subject.
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.
You are right: the statement in the bug report that AliasLevel<3
is broken is wrong. The VM crashes for AliasLevel=0
and AliasLevel=1
but not for AliasLevel=2
. So with -XX:-DoEscapeAnalysis
it is always automatically set toAliasLevel=2
.
But when -XX:+DoEscapeAnalysis -XX:+EliminateAllocations
there is ONE use-case for AliasLevel
:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/escape.cpp#L336-L341
- for
-XX:AliasLevel=3
split_unique_types(alloc_worklist, arraycopy_worklist, mergemem_worklist);
is called - for
-XX:AliasLevel=2
split_unique_types(alloc_worklist, arraycopy_worklist, mergemem_worklist);
is NOT called
So does the use case -XX:+DoEscapeAnalysis -XX:+EliminateAllocations -XX:AliasLevel=2
make sense and is it something that is used?
Since AliasLevel
is not completely broken the question is if we should deprecated instead of making it obsolete?
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 don't think there is a real use case for -XX:AliasLevel=2
given that one can get similar behavior with -XX:-EliminateAllocations
(or -XX:-DoEscapeAnalysis
). I would therefore vote for deprecating AliasLevel
.
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.
Yes, I agree with Tobias. Lets treat -XX:AliasLevel=2
as -XX:-EliminateAllocations
. There are tests which use this flags.
And yes, we should deprecate AliasLevel
but correcting bug's and CSR's text with this new information about -XX:AliasLevel=2
.
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.
The CSR request (JDK-8284515) is now updated for deprecating AliasLevel
From looking at the code and history, it seems that
But |
This reverts commit 6a1bed2.
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 to me.
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.
Good.
@tobiasholenstein This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 164 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann, @vnkozlov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
thanks @TobiHartmann and @vnkozlov for the reviews! |
/integrate |
@tobiasholenstein |
/sponsor |
Going to push as commit 46b2e54.
Your commit was automatically rebased without conflicts. |
@TobiHartmann @tobiasholenstein Pushed as commit 46b2e54. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Deprecate the
AliasLevel
flag.AliasLevel
can have the following values:"0 - for no aliasing, "
"1 - for oop/field/static/array split, "
"2 - for class split, "
"3 - for unique instances"
Users will now get the following message when running:
java -XX:AliasLevel= Java HotSpot(TM) 64-Bit Server VM warning: Option AliasLevel was deprecated in version 19.0 and will likely be removed in a future release.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8140/head:pull/8140
$ git checkout pull/8140
Update a local copy of the PR:
$ git checkout pull/8140
$ git pull https://git.openjdk.java.net/jdk pull/8140/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8140
View PR using the GUI difftool:
$ git pr show -t 8140
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8140.diff