Skip to content
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

8258192: Obsolete the CriticalJNINatives flag #6343

Closed
wants to merge 3 commits into from

Conversation

coleenp
Copy link
Contributor

@coleenp coleenp commented Nov 10, 2021

This change removes the disabled CriticalJNINatives code, and the flag now gives an obsolete message.
Tested with tier1 on cpus x64, aarch64, and builds on linux-x86-open,linux-s390x-open,linux-arm32-debug,linux-ppc64le-debug.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6343/head:pull/6343
$ git checkout pull/6343

Update a local copy of the PR:
$ git checkout pull/6343
$ git pull https://git.openjdk.java.net/jdk pull/6343/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6343

View PR using the GUI difftool:
$ git pr show -t 6343

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6343.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 10, 2021

👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 10, 2021
@openjdk
Copy link

openjdk bot commented Nov 10, 2021

@coleenp The following label will be automatically applied to this pull request:

  • hotspot

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.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Nov 10, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 10, 2021

Webrevs

@@ -1823,7 +1743,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
//
// NW [ABI_REG_ARGS] <-- 1) R1_SP
// [outgoing arguments] <-- 2) R1_SP + out_arg_slot_offset
// [oopHandle area] <-- 3) R1_SP + oop_handle_offset (save area for critical natives)
// [oopHandle area] <-- 3) R1_SP + oop_handle_offset (save area for critical natives) ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?. The comment (save area for critical natives) must be redundant now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know if the save area is still needed for something else, which is why I left the ?. I can remove the comment but haven't made any substantial changes here. I'm not sure if they're needed or not, but I can't test them if I made them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking further, the area is needed (stores oops there), but not the comment.

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Outdated Show resolved Hide resolved
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Show resolved Hide resolved
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Outdated Show resolved Hide resolved
src/hotspot/share/runtime/sharedRuntime.cpp Show resolved Hide resolved
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of all platforms. move_ptr(MacroAssembler*, VMRegPair, VMRegPair, int) needs to get removed to avoid build warnings on PPC64 and s390.

Copy link
Contributor Author

@coleenp coleenp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing, Aleksey. I made the changes and will retest.

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Show resolved Hide resolved
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Outdated Show resolved Hide resolved
src/hotspot/share/runtime/sharedRuntime.cpp Show resolved Hide resolved
@coleenp
Copy link
Contributor Author

coleenp commented Nov 11, 2021

Thanks for finding move_ptr @TheRealMDoerr.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@openjdk
Copy link

openjdk bot commented Nov 11, 2021

@coleenp 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:

8258192: Obsolete the CriticalJNINatives flag

Reviewed-by: mdoerr, shade

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 11, 2021
@coleenp
Copy link
Contributor Author

coleenp commented Nov 12, 2021

Thanks for reviewing @TheRealMDoerr . @shipilev does this look good now?

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I am fine with this.

@openjdk
Copy link

openjdk bot commented Nov 12, 2021

@coleenp this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout critical
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed ready Pull request is ready to be integrated labels Nov 12, 2021
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Nov 12, 2021
@coleenp
Copy link
Contributor Author

coleenp commented Nov 12, 2021

Thanks @shipilev . All the GHA passed after resolving above merge conflict.
/integrate

@openjdk
Copy link

openjdk bot commented Nov 12, 2021

Going to push as commit 0d2980c.
Since your change was applied there have been 3 commits pushed to the master branch:

  • 5a2452c: 8274835: Remove unnecessary castings in java.base
  • 3b2585c: 8276658: Clean up JNI local handles code
  • aeba653: 8276743: Make openjdk build Zip Archive generation "reproducible"

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 12, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 12, 2021
@openjdk
Copy link

openjdk bot commented Nov 12, 2021

@coleenp Pushed as commit 0d2980c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@coleenp coleenp deleted the critical branch Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
4 participants