-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8291752: AArch64: Remove check_emit_size parameter from trampoline_call #9782
Conversation
👋 Welcome back eastig! A progress list of the required criteria for merging this PR into |
/label hotspot-compiler |
@eastig |
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 have few comments.
// If we generated no stub, patch this call directly to dest. | ||
// This will happen if we don't need far branches or if there | ||
// already was a trampoline. |
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 think this comment should be changed since you changed the code.
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 original code looks strange to me.
If we need a stub but we have failed to create it, we set dest anyway. This will lead to an incorrect instruction.
The behaviour is undefined. We might fail executing the instruction or jump somewhere.
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've restored the original functionality.
Maybe Andrew(@theRealAph) can explain what should be here.
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.
@eastig 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 85 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 (@vnkozlov, @theRealAph) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@vnkozlov Thank you for reviewing. |
This looks very wrong to me. We could usefully add trampolines to C1, and this just makes doing that more difficult. Why don't you just define is_c2_compilation() appropriately in macroAssembler? |
Or (better) |
Thank you for the suggestion. It's better. |
@vnkozlov @theRealAph, any comments on the version with the virtual |
@theRealAph Thank you |
/integrate |
/sponsor |
Going to push as commit cb37282.
Your commit was automatically rebased without conflicts. |
MacroAssembler::trampoline_call
can skip generation of a trampoline stub if C2 phase output is in the checking emitted code size mode. If it is not C2 compilation,trampoline_call
always generates a trampoline stub.gen_continuation_enter
as a part of C2 compilation needed to disable the functionality above. Nowtrampoline_call
has thecheck_emit_size
which allows to disable the functionality completely. Its default value istrue
which means the functionality is enabled.There are problems:
is_c2_compile
. JDK-8291654 is an example of changes caused UB.check_emit_size
. The current valuetrue
allows C1 to access the C2 specific code. Setting the default value tofalse
will require to review and to update every existing use oftrampoline_call
. It will complicate uses oftrampoline_call
: each time a decision needs to be done - use or not use the default.Summary of changes:
in_scratch_emit_size
returningfalse
by default. It is privately overridden inC2_MacroAssembler
. The overridden version returnstrue
if C2 phase output is in the checking emitted code size mode.check_emit_size
is removed because it is not needed any more.Tested with fastdebug/release builds:
gtest
: Passed.tier1
...tier4
: Passed.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9782/head:pull/9782
$ git checkout pull/9782
Update a local copy of the PR:
$ git checkout pull/9782
$ git pull https://git.openjdk.org/jdk pull/9782/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9782
View PR using the GUI difftool:
$ git pr show -t 9782
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9782.diff