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

8293844: C2: Verify Location::{oop,normal} types in PhaseOutput::FillLocArray #10281

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 15, 2022

I have been debugging a weird issue in C2/deopt, and wanted to have stronger asserts in critical paths. One such place is PhaseOutput::FillLocArray, which emits Location::normal on unconditional else branch. Location::normal is described as "Ints, floats, double halves". I think we would be better off verifying the types explicitly. Same goes for Location::oop, which we can also verify.

Aside: In fact, I suspect the whole Regalloc::is_oop business can go away, and we can rely on reg types to sense if we are dealing with oops here, but that looks like a change with some unexpected effects, so I would like to do that separately, see JDK-8293845.

Additional testing:

  • Linux x86_64 fastdebug tier1
  • Linux x86_64 fastdebug tier2
  • Linux x86_32 fastdebug tier1
  • Linux x86_32 fastdebug tier2

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-8293844: C2: Verify Location::{oop,normal} types in PhaseOutput::FillLocArray

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10281

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 15, 2022

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

openjdk bot commented Sep 15, 2022

@shipilev 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 15, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 15, 2022

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Looks reasonable. I will test it.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

My tier1-4 and xcomp testing passed too.

@openjdk
Copy link

openjdk bot commented Sep 15, 2022

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

8293844: C2: Verify Location::{oop,normal} types in PhaseOutput::FillLocArray

Reviewed-by: kvn, dlong

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

  • 3beca2d: 8291600: [vectorapi] vector cast op check is not always needed for vector mask cast
  • 9a40b76: 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options
  • bb9aa4e: 8293813: ProblemList com/sun/jdi/JdbLastErrorTest.java on windows-x64 in Xcomp mode
  • 4cec141: 8291509: Minor cleanup could be done in sun.security
  • 6beeb84: 8293875: ProblemList sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 on linux-x64
  • bf79f99: 8292989: Avoid dynamic memory in AsyncLogWriter
  • 2028ec7: 8289608: Change com/sun/jdi tests to not use Thread.suspend/resume
  • ecb456a: 8293779: redundant checking in AESCrypt.makeSessionKey() method
  • 6fca9ae: 8288474: Move EventContinuationFreezeOld from try_freeze_fast to freeze_slow
  • fbd8b42: 8293591: Remove use of Thread.stop from jshell tests
  • ... and 12 more: https://git.openjdk.org/jdk/compare/7f3250d71c4866a64eb73f52140c669fe90f122f...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 Sep 15, 2022
Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

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

Seems fine. I did not check that the types checked by the new asserts are exhaustive.

@shipilev
Copy link
Member Author

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Sep 19, 2022

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

  • 357a2cc: 8293937: x86: Drop LP64 conditions from clearly x86_32 code
  • b1ed40a: 8293466: libjsig should ignore non-modifying sigaction calls
  • b6ff8fa: 8292073: NMT: remove unused constructor parameter from MallocHeader
  • cfd44bb: 8293218: serviceability/tmtools/jstat/GcNewTest.java fails with "Error in the percent calculation"
  • 01e7b88: 8290917: x86: Memory-operand arithmetic instructions have too low costs
  • 4b8399b: 8293251: Use stringStream::base() instead of as_string() when applicable
  • a8f0f57: 8278165: Clarify that ZipInputStream does not access the CEN fields for a ZipEntry
  • 746f5f5: 8293816: CI: ciBytecodeStream::get_klass() is not consistent
  • 4b297c1: 8293892: Add links to JVMS 19 and 20 from ClassFileFormatVersion enum constants
  • dfb9c06: 8293535: jdk/javadoc/doclet/testJavaFX/TestJavaFxMode.java fail with jfx
  • ... and 28 more: https://git.openjdk.org/jdk/compare/7f3250d71c4866a64eb73f52140c669fe90f122f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 19, 2022

@shipilev Pushed as commit 26e08cf.

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

@shipilev shipilev deleted the JDK-8293844-c2-verify-fillocarray branch October 21, 2022 09:56
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