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

8256215: Shenandoah: re-organize saving/restoring machine state in assembler code #1172

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Nov 11, 2020

$ CONF=linux-x86-server-fastdebug make images run-test TEST=compiler/c1/Test6855215.java TEST_VM_OPTS="-XX:+UseShenandoahGC"

# Internal Error (/home/shade/trunks/jdk/src/hotspot/cpu/x86/assembler_x86.cpp:3047), pid=1427307, tid=1427311
# Error: assert(VM_Version::supports_sse2()) failed

V [libjvm.so+0x53f9e8] Assembler::movsd(Address, XMMRegisterImpl*)+0x168
V [libjvm.so+0x14647bd] save_xmm_registers(MacroAssembler*)+0x9d
V [libjvm.so+0x1465d8f] ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler*, RegisterImpl*, Address, ShenandoahBarrierSet::AccessKind)+0x91f

This only affects x86_32, as x86_64 uses at least UseSSE >= 2 at all times.

Additional testing:

  • tier1, Linux x86_64 -XX:+UseShenandoahGC
  • tier1, Linux x86_32 -XX:+UseShenandoahGC
  • tier1, Linux x86_32 -XX:+UseShenandoahGC -XX:UseSSE=0
  • tier1, Linux x86_32 -XX:+UseShenandoahGC -XX:UseSSE=1

Progress

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

Issue

  • JDK-8256215: Shenandoah: re-organize saving/restoring machine state in assembler code

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1172/head:pull/1172
$ git checkout pull/1172

@shipilev shipilev changed the title 8256215: Some x86_32 Shenandoahs test fail due to using unsupported SSE2 instructions 8256215: Some x86_32 Shenandoah tests fail due to using unsupported SSE2 instructions Nov 11, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 11, 2020

👋 Welcome back shade! 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
Copy link

openjdk bot commented Nov 11, 2020

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Nov 11, 2020
@openjdk
Copy link

openjdk bot commented Nov 11, 2020

@shipilev 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 JDK-8256215-shenandoah-no-sse2-fail
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 the merge-conflict Pull request has merge conflict with target branch label Nov 11, 2020
@shipilev shipilev force-pushed the JDK-8256215-shenandoah-no-sse2-fail branch from 783a687 to e28c534 Compare Nov 12, 2020
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Nov 12, 2020
@shipilev shipilev changed the title 8256215: Some x86_32 Shenandoah tests fail due to using unsupported SSE2 instructions 8256215: Shenandoah: re-organize saving/restoring machine state in assembler code Nov 13, 2020
Copy link
Contributor

@rkennke rkennke left a comment

Nice change! See comment. Do we need to handle no-SSE case too?

@shipilev shipilev force-pushed the JDK-8256215-shenandoah-no-sse2-fail branch from e28c534 to 69475ad Compare Dec 1, 2020
@shipilev shipilev force-pushed the JDK-8256215-shenandoah-no-sse2-fail branch from 69475ad to b11adfe Compare Dec 1, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 29, 2020

@shipilev This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@shipilev shipilev marked this pull request as ready for review Jan 27, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 27, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 27, 2021

Webrevs

Copy link
Contributor

@zhengyu123 zhengyu123 left a comment

Probably, no processor that does not support sse2, but should we always use VM_version::supports_sse(x)? instead of UseSSE(x)

@shipilev
Copy link
Member Author

shipilev commented Jan 27, 2021

Probably, no processor that does not support sse2, but should we always use VM_version::supports_sse(x)? instead of UseSSE(x)

"Hotspot way" seems to be "check for VM_version::supports_sse* in assemblers" + "check for appropriate UseSSE level in machine-specific code before asking assemblers". This is what the patch does. ...or I misunderstand the question.

Copy link
Contributor

@rkennke rkennke left a comment

Looks good, but I have questions.

Copy link
Contributor

@rkennke rkennke left a comment

Looks good to me! Thanks!

@openjdk
Copy link

openjdk bot commented Jan 27, 2021

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

8256215: Shenandoah: re-organize saving/restoring machine state in assembler code

Reviewed-by: rkennke, zgu

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

  • 311a0a9: 8259808: Add JFR event to detect GC locker stall
  • f353fcf: 8258894: C2: Forbid GCM to move stores into loops
  • ac276bb: 8257074: Update the ByteBuffers micro benchmark
  • 7ed591c: 8260314: Replace border="1" on tables with CSS

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Jan 27, 2021
@zhengyu123
Copy link
Contributor

zhengyu123 commented Jan 27, 2021

Probably, no processor that does not support sse2, but should we always use VM_version::supports_sse(x)? instead of UseSSE(x)

"Hotspot way" seems to be "check for VM_version::supports_sse* in assemblers" + "check for appropriate UseSSE level in machine-specific code before asking assemblers". This is what the patch does. ...or I misunderstand the question.

Okay, then.

@shipilev
Copy link
Member Author

shipilev commented Jan 28, 2021

/integrate

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

openjdk bot commented Jan 28, 2021

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

Your commit was automatically rebased without conflicts.

Pushed as commit a97aedf.

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

@shipilev shipilev deleted the JDK-8256215-shenandoah-no-sse2-fail branch Jan 29, 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 shenandoah shenandoah-dev@openjdk.org
3 participants