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

8264063: Outer Safepoint poll load should not reference the head of inner strip mined loop. #3365

Closed
wants to merge 2 commits into from

Conversation

vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Apr 7, 2021

When loop is "strip mined" polling address load (parse1.cpp#L2280) should be cloned together with safepoint node and pinned outside inner loop. Otherwise we have issues like 8263352

I also remove leftover (unused needs_polling_address_input() method) from 8220051 changes.

Tested hs-tier1-4


Progress

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

Issue

  • JDK-8264063: Outer Safepoint poll load should not reference the head of inner strip mined loop.

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3365

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 7, 2021

👋 Welcome back kvn! 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 Apr 7, 2021
@openjdk
Copy link

openjdk bot commented Apr 7, 2021

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Apr 7, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 7, 2021

Webrevs

@pfustc
Copy link
Member

pfustc commented Apr 7, 2021

Should we also remove below part of code in loopTransform.cpp in this patch?

3704         if (n->is_CountedLoop() && n->as_CountedLoop()->is_strip_mined()) {
3705           // In strip-mined counted loops, the CountedLoopNode may be
3706           // used by the address polling node of the outer safepoint.
3707           // Skip this use because it's safe.
3708           Node* sfpt = n->as_CountedLoop()->outer_safepoint();
3709           Node* polladr = sfpt->in(TypeFunc::Parms+0);
3710           if (use == polladr) {
3711             continue;
3712           }
3713         }

@vnkozlov
Copy link
Contributor Author

vnkozlov commented Apr 7, 2021

Should we also remove below part of code in loopTransform.cpp in this patch?

3704         if (n->is_CountedLoop() && n->as_CountedLoop()->is_strip_mined()) {
3705           // In strip-mined counted loops, the CountedLoopNode may be
3706           // used by the address polling node of the outer safepoint.
3707           // Skip this use because it's safe.
3708           Node* sfpt = n->as_CountedLoop()->outer_safepoint();
3709           Node* polladr = sfpt->in(TypeFunc::Parms+0);
3710           if (use == polladr) {
3711             continue;
3712           }
3713         }

I thought that it does not harm to have this code but on other hand it will be not executed anymore.
I will removed it and I will run ArrayFill.java to make sure optimization works with strip mined loops.

@vnkozlov
Copy link
Contributor Author

vnkozlov commented Apr 7, 2021

I removed pointed code and verified that arrayfill optimization still works with strip mined loops.

Copy link
Contributor

@rwestrel rwestrel left a 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.

@openjdk
Copy link

openjdk bot commented Apr 8, 2021

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

8264063: Outer Safepoint poll load should not reference the head of inner strip mined loop.

Reviewed-by: roland, vlivanov

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

  • af13c64: 8264711: More runtime TRAPS cleanups
  • 3aec2d9: 8264718: Shenandoah: enable string deduplication during root scanning
  • 255afbe: 8264672: runtime/ParallelLoad/ParallelSuperTest.java timed out
  • ec599da: 8264633: Add missing logging to PlatformRecording#stop
  • e89542f: 8264352: AArch64: Optimize vector "not/andNot" for NEON and SVE
  • 016db40: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to
  • 78d1164: 8214455: Relocate CDS archived regions to the top of the G1 heap
  • 88eb291: 8264809: test-lib fails to build due to some warnings in ASN1Formatter and jfr
  • a863ab6: 8264551: Unexpected warning when jpackage creates an exe
  • 6e2b82a: 8264731: Introduce InstanceKlass::method_at_itable_or_null()
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/4bb80f3720936d0cd9836e4f9c7233d2b4d8eee3...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 Pull request is ready to be integrated label Apr 8, 2021
Copy link
Contributor

@iwanowww iwanowww left a comment

Choose a reason for hiding this comment

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

Looks good.

@vnkozlov
Copy link
Contributor Author

vnkozlov commented Apr 8, 2021

Thank you Vladimir and Roland.

@vnkozlov
Copy link
Contributor Author

vnkozlov commented Apr 8, 2021

/integrate

@openjdk openjdk bot closed this Apr 8, 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 Apr 8, 2021
@openjdk
Copy link

openjdk bot commented Apr 8, 2021

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

  • 04fa1ed: 8264848: [macos] libjvm.dylib linker warning due to macOS version mismatch
  • 214d6e2: 8263506: Make sun.net.httpserver.UnmodifiableHeaders unmodifiable
  • af13c64: 8264711: More runtime TRAPS cleanups
  • 3aec2d9: 8264718: Shenandoah: enable string deduplication during root scanning
  • 255afbe: 8264672: runtime/ParallelLoad/ParallelSuperTest.java timed out
  • ec599da: 8264633: Add missing logging to PlatformRecording#stop
  • e89542f: 8264352: AArch64: Optimize vector "not/andNot" for NEON and SVE
  • 016db40: 8263907: Specification of CellRendererPane::paintComponent(..Rectangle) should clearly mention which method it delegates the call to
  • 78d1164: 8214455: Relocate CDS archived regions to the top of the G1 heap
  • 88eb291: 8264809: test-lib fails to build due to some warnings in ASN1Formatter and jfr
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/4bb80f3720936d0cd9836e4f9c7233d2b4d8eee3...master

Your commit was automatically rebased without conflicts.

Pushed as commit 81d35e4.

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

@vnkozlov vnkozlov deleted the JDK-8264063 branch April 8, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants