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

8313438: [s390x] build broken after JDK-8301996 #15885

Closed
wants to merge 3 commits into from

Conversation

offamitkumar
Copy link
Member

@offamitkumar offamitkumar commented Sep 22, 2023

Build Fix after JDK-8301996.

Warnings related to new Lightweight locking scheme are seen during the build phase, but we will get rid of them, after integrating #14414 . Testing done for release-vm, slowdebug-vm, fastdebug-vm and optimized-vm.

3 Test failures seen on s390x are un-related to these changes.

jdk/jshell/ClassMembersTest.java
java/lang/invoke/condy/CondyWrongType.java
java/lang/invoke/condy/CondyWithGarbageTest.java

JBS issue for test failures: JDK-8317581.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8313438: [s390x] build broken after JDK-8301996 (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15885/head:pull/15885
$ git checkout pull/15885

Update a local copy of the PR:
$ git checkout pull/15885
$ git pull https://git.openjdk.org/jdk.git pull/15885/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15885

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15885.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 22, 2023

👋 Welcome back amitkumar! 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 changed the title 8313438 8313438: [s390x] build broken after JDK-8301996 Sep 22, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 22, 2023
@openjdk
Copy link

openjdk bot commented Sep 22, 2023

@offamitkumar 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 Sep 22, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 22, 2023

Webrevs

@offamitkumar offamitkumar marked this pull request as draft September 22, 2023 14:29
@openjdk openjdk bot removed the rfr Pull request is ready for review label Sep 22, 2023
@offamitkumar offamitkumar force-pushed the JDK-8313438 branch 5 times, most recently from b8b5c5a to 5c381ef Compare September 27, 2023 09:35
@offamitkumar offamitkumar marked this pull request as ready for review October 5, 2023 10:11
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 5, 2023
@offamitkumar
Copy link
Member Author

Hi @RealLucy , @TheRealMDoerr

Please consider to review this PR, as per your availability.

Thank you.

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.

Looks basically good, but I have a couple of questions and suggestions.


// Displacement is 0. No need to care about limited displacement range.
const Address field(fieldAddr);
__ lgr_if_needed(fieldAddr, off);
Copy link
Contributor

Choose a reason for hiding this comment

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

Was there a problem with the range? Why did it work in the old implementation?

Copy link
Contributor

Choose a reason for hiding this comment

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

The comment is related to the uses of field. Depending on the instruction, disc is limited to be uimm12 or simm20. But the Address object is with displacement == 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't get why the separate agr instructions are needed as part of this PR. Isn't that a separate issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Martin, Are you referring to the fix for preserving flag register value till the end ?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you want that this case to be handled in separate PR, then I'll file a JBS issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

I need an explanation why this code was changed this way. If it is required for this PR, please explain in comments. If it's a separate issue, please handle separately.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, Issue was with the flag register value. We need to check the volatility at the end of putfield_or_static method. And previous implementation was not preserving the value till the end, why it was working then ? That I don't know.

Current Implementation uses z_tmp_1 for saving flag value till end. obj now points to Z_ARG5 which is also pointed by oopStore_tmp2, and if we don't use agr then in case of object/atos , will run into Multiple usecase for Z_R6 error from do_oop_store() method .

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the agr only used to save a register? That should be explained in the comments. I believe it's only needed for the object case, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

The prior implementation used two non-volatile registers. Due to register shortage, only one register can be used. Penalty: compute the sum of obj and off explicitly immediately after the obj pointer is popped from stack. In the non-static case, this can't be done upfront.


// Displacement is 0. No need to care about limited displacement range.
const Address field(fieldAddr);
__ lgr_if_needed(fieldAddr, off);
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment is related to the uses of field. Depending on the instruction, disc is limited to be uimm12 or simm20. But the Address object is with displacement == 0.

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.

I couldn't spot any obvious bug. Changes lgtm.

@openjdk
Copy link

openjdk bot commented Oct 9, 2023

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

8313438: [s390x] build broken after JDK-8301996

Reviewed-by: mdoerr, lucy

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

  • 3ff5a78: 8317693: Unused parameter to Tokens.Token.comment method
  • 508fa71: 8317736: Stream::handleReset locks twice
  • 1f06325: 8317471: ListFormat::parseObject() spec can be improved on parsePosition valid values
  • a07a4a3: 8317422: [JVMCI] concurrency issue in MethodData creation
  • 7ff1938: 8310727: C2: *_of() methods in PhaseIterGVN should use uint for the node index
  • a57ae7e: 8317594: G1: Refactor find_empty_from_idx_reverse
  • 6ddbfaa: 8317136: [AIX] Problem List runtime/jni/terminatedThread/TestTerminatedThread.java
  • 0cf1a55: 8317440: Lock rank checking fails when code root set is modified with the Servicelock held after JDK-8315503
  • bcc986b: 8317601: Windows build on WSL broken after JDK-8317340
  • 460ebcd: 8314978: Multiple server call from connection failing with expect100 in getOutputStream
  • ... and 16 more: https://git.openjdk.org/jdk/compare/a250ae4d1b9c27757eb12d2f1673187c862149aa...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 Oct 9, 2023
Copy link
Contributor

@RealLucy RealLucy 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, finally.
Thank you for patiently considering all the comments and change requests.


// Displacement is 0. No need to care about limited displacement range.
const Address field(fieldAddr);
__ lgr_if_needed(fieldAddr, off);
Copy link
Contributor

Choose a reason for hiding this comment

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

The prior implementation used two non-volatile registers. Due to register shortage, only one register can be used. Penalty: compute the sum of obj and off explicitly immediately after the obj pointer is popped from stack. In the non-static case, this can't be done upfront.

@offamitkumar
Copy link
Member Author

Thank you Martin, Lutz. For your valuable reviews & suggestions.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 11, 2023

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

  • ca96fd3: 8317839: Exclude java/nio/channels/Channels/SocketChannelStreams.java on AIX
  • a9b41da: 8317603: Improve exception messages thrown by sun.nio.ch.Net native methods (win)
  • 0fd8071: 8317738: CodeCacheFullCountTest failed with "VirtualMachineError: Out of space in CodeCache for method handle intrinsic"
  • 1161e3d: 8317803: Exclude java/net/Socket/asyncClose/Race.java on AIX
  • e55c482: 8317790: Fix Bug entry for exclusion of runtime/jni/terminatedThread/TestTerminatedThread.java on AIX
  • 84b7cc1: 8317761: Combine two versions of print_statistics() in java.cpp
  • 3aa4cba: 8316975: Memory leak in MTLSurfaceData
  • 54861df: 8317802: jmh tests fail with Unable to find the resource: /META-INF/BenchmarkList after JDK-8306819
  • f40ea51: 8317751: ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows
  • fec1d49: 8316452: java/lang/instrument/modules/AppendToClassPathModuleTest.java ignores VM flags
  • ... and 41 more: https://git.openjdk.org/jdk/compare/a250ae4d1b9c27757eb12d2f1673187c862149aa...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 11, 2023
@openjdk openjdk bot closed this Oct 11, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 11, 2023
@openjdk
Copy link

openjdk bot commented Oct 11, 2023

@offamitkumar Pushed as commit 7976151.

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

@offamitkumar offamitkumar deleted the JDK-8313438 branch May 15, 2024 09:45
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.

3 participants