Skip to content

Conversation

@TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Mar 24, 2023

I suggest to remove this code for the following reasons:

  • It doesn't work with ZGC (oop needs to go through load barrier, see JBS issue).
  • It generates too much code. Loading oops is quite common and the oop verification code is quite lengthy.
  • Other platforms don't have it, either.

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-8304880: [PPC64] VerifyOops code in C1 doesn't work with ZGC

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13175

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 24, 2023

👋 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 openjdk bot added the rfr Pull request is ready for review label Mar 24, 2023
@openjdk
Copy link

openjdk bot commented Mar 24, 2023

@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 Mar 24, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 24, 2023

Webrevs

@TheRealMDoerr
Copy link
Contributor Author

/label add hotspot-gc

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Mar 24, 2023
@openjdk
Copy link

openjdk bot commented Mar 24, 2023

@TheRealMDoerr
The hotspot-gc label was successfully added.

@shipilev
Copy link
Member

So this check_oop happens too early after the load, right?

There are also VerifyOops blocks for stores in the same file, would you like to handle those as well? These oops should be okay with most GCs, but the point about the code size stands. Other platforms do not have the checks on those paths too, AFAICS.

@TheRealMDoerr
Copy link
Contributor Author

So this check_oop happens too early after the load, right?

Correct, it is placed between the raw load and the load barrier.

There are also VerifyOops blocks for stores in the same file, would you like to handle those as well? These oops should be okay with most GCs, but the point about the code size stands. Other platforms do not have the checks on those paths too, AFAICS.

The store cases are ok with all GCs because we only write valid oops into the heap. Stores seem to be a less frequent than loads. So, the impact on size is smaller. But we could discuss the removal. Other platforms don't have them.

@shipilev
Copy link
Member

The store cases are ok with all GCs because we only write valid oops into the heap. Stores seem to be a less frequent than loads. So, the impact on size is smaller. But we could discuss the removal. Other platforms don't have them.

I see no reason to leave them. Your call.

@openjdk
Copy link

openjdk bot commented Mar 24, 2023

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

8304880: [PPC64] VerifyOops code in C1 doesn't work with ZGC

Reviewed-by: shade

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

  • 9764948: 8273986: JEditorPane HTML Demo - Accessibility issues
  • 5727610: 8304353: Add lib-test tier1 testing in GHA
  • d8ba227: 8304069: ClassFileParser has ad-hoc hashtables
  • 9a8a60f: 8304833: (fc) Remove dead code in sun.nio.ch.FileChannelImpl::implCloseChannel
  • f96aee7: 8291154: Create a non static nested class without enclosing class throws VerifyError

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 Mar 24, 2023
@TheRealMDoerr
Copy link
Contributor Author

Thanks for the review!
Hmm, it may be beneficial in some bug chasing scenario if we can ensure that C1 doesn't write any broken oops. I think I had implemented the checking code for that a long time ago. On the other side, we didn't need it for quite some time. Maybe someone else has an opinion about it.

@TheRealMDoerr
Copy link
Contributor Author

17u is also affected. I keep this PR to fix only the ZGC issue without further cleanup. In addition, the store part may be interesting for testing generational ZGC.
/integrate

@openjdk
Copy link

openjdk bot commented Mar 28, 2023

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

  • 83ce65e: 8305004: add @SPEC tags to langtools modules
  • 32ef452: 8304884: Update Bytecodes data to be mostly compile time constants
  • 927e674: 8300977: Retire java.io.ExpiringCache
  • c90699e: 8304989: unnecessary dash in @param gives double-dash in docs
  • 395a4ce: 8304591: (fs) UnixPath.stringValue need not be volatile
  • 60640a2: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream
  • cddaf68: 8304962: sun/net/www/http/KeepAliveCache/B5045306.java: java.lang.RuntimeException: Failed: Initial Keep Alive Connection is not being reused
  • a06f461: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc
  • 7987ad4: 8304412: Serial: Refactor old generation cards update after Full GC
  • 3c4cd50: 8304963: HttpServer closes connection after processing HEAD after JDK-7026262
  • ... and 32 more: https://git.openjdk.org/jdk/compare/4ec720db9f1fedb5da96e70d1a8c5da5e773a5a7...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 28, 2023

@TheRealMDoerr Pushed as commit 695683b.

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

@TheRealMDoerr TheRealMDoerr deleted the 8304880_PPC64_C1_VerifyOops branch March 28, 2023 15:46
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 hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants