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

8266542: Remove broken -XX:-UseLoopSafepoints flag #3871

Closed
wants to merge 2 commits into from

Conversation

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented May 5, 2021

Simply running java -XX:-UseLoopSafepoints already asserts and more sophisticated testing triggers all kinds of asserts and crashes in various places. JDK-6232281 made an attempt of fixing a common case. I had a quick look on what it would take to fix all cases and it's definitely non trivial. Also, we would need to make sure that new optimizations work without safepoints in loops. I don't see much value in keeping the flag for debugging either because disabling safepoints in loops has massive side-effects on other optimizations.

I therefore propose to remove the flag.

Thanks,
Tobias


Progress

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

Issue

  • JDK-8266542: Remove broken -XX:-UseLoopSafepoints flag

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3871

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 5, 2021

👋 Welcome back thartmann! 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 label May 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 5, 2021

@TobiHartmann 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 label May 5, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 5, 2021

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Lgtm.

@openjdk
Copy link

@openjdk openjdk bot commented May 5, 2021

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

8266542: Remove broken -XX:-UseLoopSafepoints flag

Reviewed-by: tschatzl, kvn

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 14 new commits pushed to the master branch:

  • 6018336: 8259316: [REDO] C1/C2 compiler support for blackholes
  • f07bb2f: 8250766: javadoc adds redundant spaces when @see program element is wrapped
  • 61bb6ec: 8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64
  • a05e8e2: 8266497: Remove unnecessary EMCP liveness indication
  • 6ba911d: 8266498: Make debug ps() call print_stack
  • ef0f693: 8266499: Delete dead code in aarch64.ad
  • 71d0858: 8266522: Shenandoah: Shenandoah LRB calls wrong runtime barrier on aarch64
  • 0ac84d1: 8266506: [aix] Treat mapping attempt too close to BRK as a mapping error
  • 02cdd6e: 8266419: [aix] in mmap mode, os::attempt_reserve_memory_at() fails to handle wrong mapping address
  • 250b45a: 8266222: [aix] In mmap-mode, partial releases with os::release_memory may trash internal bookkeeping
  • ... and 4 more: https://git.openjdk.java.net/jdk/compare/b71f85ad9d5dbd59b1d279148bc65ac26309a942...master

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.

➡️ 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 label May 5, 2021
@TobiHartmann
Copy link
Member Author

@TobiHartmann TobiHartmann commented May 5, 2021

Thanks for the review, Thomas!

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Note, UseLoopSafepoints is debug flag so we don't need CSR for removing it.

Consider removing OptoRemoveUseless debug flag too because it is related to safepoints and we never used it AFAIK:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/parse1.cpp#L2291

@kelthuzadx
Copy link
Member

@kelthuzadx kelthuzadx commented May 5, 2021

Consider removing OptoRemoveUseless debug flag too because it is related to safepoints and we never used it AFAIK:

Agree!
FYI: C2 crashes in many places if turned off OptoRemoveUseless, it would takes a lot of time to fix this.

@TobiHartmann
Copy link
Member Author

@TobiHartmann TobiHartmann commented May 6, 2021

Thanks for the review, Vladimir! Good point, I'll remove OptoRemoveUseless as well with a separate PR.

@TobiHartmann
Copy link
Member Author

@TobiHartmann TobiHartmann commented May 6, 2021

/integrate

@openjdk openjdk bot closed this May 6, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels May 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 6, 2021

@TobiHartmann Since your change was applied there have been 19 commits pushed to the master branch:

  • 7835cdb: 8265915: adjust state_unloading_cycle compuation order in nmethod::is_unloading
  • 20ad428: 8180568: Refactor javax/crypto shell tests to plain java tests
  • 138d573: 8262392: Update Mesa 3-D Headers to version 21.0.3
  • 9de62a4: 8266505: Cleanup LibraryCallKit::make_unsafe_address()
  • 1885c83: 8266504: Remove leftovers from BarrierSetAssemblerC1
  • 6018336: 8259316: [REDO] C1/C2 compiler support for blackholes
  • f07bb2f: 8250766: javadoc adds redundant spaces when @see program element is wrapped
  • 61bb6ec: 8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64
  • a05e8e2: 8266497: Remove unnecessary EMCP liveness indication
  • 6ba911d: 8266498: Make debug ps() call print_stack
  • ... and 9 more: https://git.openjdk.java.net/jdk/compare/b71f85ad9d5dbd59b1d279148bc65ac26309a942...master

Your commit was automatically rebased without conflicts.

Pushed as commit 22ca62c.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants