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

8325326: [PPC64] Don't relocate in case of allocation failure #17744

Closed

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Feb 7, 2024

relocate should be called after the result of address_constant has been checked. Otherwise, we may run into "assert(allocates2(pc)) failed: relocation addr must be in this section". SAP internal tests have passed.


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-8325326: [PPC64] Don't relocate in case of allocation failure (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17744

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

Using diff file

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

Webrev

Link to Webrev Comment

@TheRealMDoerr TheRealMDoerr marked this pull request as draft February 7, 2024 09:42
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 7, 2024

👋 Welcome back mdoerr! 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 Feb 7, 2024

@TheRealMDoerr 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 Feb 7, 2024
@TheRealMDoerr TheRealMDoerr marked this pull request as ready for review February 7, 2024 16:53
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 7, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 7, 2024

Webrevs

@TheRealMDoerr
Copy link
Contributor Author

Pre-submit tests have an unrelated problem: [ERROR] None of JAVA_HOME, JDK_ARCHIVE_URL or JDK_ARCHIVE_URL_BASE are set

@reinrich
Copy link
Member

reinrich commented Feb 8, 2024

Am I mistaken or have you eliminated all uses of allocate_oop_address?

@TheRealMDoerr
Copy link
Contributor Author

Am I mistaken or have you eliminated all uses of allocate_oop_address?

Correct, I did a little bit of cleanup and wanted to make the oop case like the metadata case. We can use constant_oop_address when we already have the oop constant to fill in. The allocate_oop_address is now unused, but we may possibly want to use it again if there's a scenario in which we want to allocate first and fill in the actual oop later. Any thoughts about this?

@GoeLin
Copy link
Member

GoeLin commented Feb 14, 2024

Hi,
as I understand, this is not only a fix, but by changing from allocate_* to constant_* it reuses entries in the oop_recorder.
I.e., if the same object is presented twice, the same index is returned now. Before, it had different indicees.
Is this intended?

@TheRealMDoerr
Copy link
Contributor Author

Hi, as I understand, this is not only a fix, but by changing from allocate_* to constant_* it reuses entries in the oop_recorder. I.e., if the same object is presented twice, the same index is returned now. Before, it had different indicees. Is this intended?

Yes. When we use the same oop constant several times, we should better share the TOC slot for efficiency reasons (space and GC overhead). We're doing this already at other places. And also for metadata. Seems like the 2 usages had been forgotten when making improvements. The allocate_* versions are only needed when we want to replace the object by a different one, typically null by the desired object.

Copy link
Member

@GoeLin GoeLin left a comment

Choose a reason for hiding this comment

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

LGTM
you might want to change the JBS title to something more meaningful
[ppc] Don't relocate in case of out-of-memory
or the like.

@openjdk
Copy link

openjdk bot commented Feb 15, 2024

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

8325326: [PPC64] Don't relocate in case of allocation failure

Reviewed-by: goetz, rrich

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

  • 80b63b6: 8323801: tag doesn't strikethrough the text
  • 9f4ec21: 8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests
  • 0aaec97: 8325763: Revert properties: vm.opt.x.*
  • 4018b2b: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin
  • 2705ed0: 8325074: ZGC fails assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 11
  • 3d85103: 8316813: NMT: Using WhiteBox API, virtual memory tracking should also be stressed in JMH tests
  • ba8db1f: 8325876: crashes in docker container tests on Linuxppc64le Power8 machines
  • 18cea82: 8319801: Recursive lightweight locking: aarch64 implementation
  • 9029bf6: 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags
  • 99c9ae1: 8323664: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java still fails with JNI warning on some Windows configurations
  • ... and 116 more: https://git.openjdk.org/jdk/compare/3bffe223a34e8077cb1ce11f64fc34fcb0751ac7...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 Feb 15, 2024
@TheRealMDoerr TheRealMDoerr changed the title 8325326: compiler/codecache/TestStressCodeBuffers.java assertion on AIX 8325326: [PPC64] Don't relocate in case of allocation failure Feb 16, 2024
@TheRealMDoerr
Copy link
Contributor Author

Thanks for the review! I have changed the title.

Copy link
Member

@reinrich reinrich 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.
Cheers, Richard.

@TheRealMDoerr
Copy link
Contributor Author

Thanks!
/integrate

@openjdk
Copy link

openjdk bot commented Feb 16, 2024

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

  • 244573e: 8265372: Simplify PKCS9Attribute
  • 80b63b6: 8323801: tag doesn't strikethrough the text
  • 9f4ec21: 8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests
  • 0aaec97: 8325763: Revert properties: vm.opt.x.*
  • 4018b2b: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin
  • 2705ed0: 8325074: ZGC fails assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 11
  • 3d85103: 8316813: NMT: Using WhiteBox API, virtual memory tracking should also be stressed in JMH tests
  • ba8db1f: 8325876: crashes in docker container tests on Linuxppc64le Power8 machines
  • 18cea82: 8319801: Recursive lightweight locking: aarch64 implementation
  • 9029bf6: 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags
  • ... and 117 more: https://git.openjdk.org/jdk/compare/3bffe223a34e8077cb1ce11f64fc34fcb0751ac7...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 16, 2024

@TheRealMDoerr Pushed as commit 4388095.

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

@TheRealMDoerr TheRealMDoerr deleted the 8325326_PPC64_reloc_assert branch February 16, 2024 15:59
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