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

8279301: c1 getObjectSize intrinsic should guard round mask constant #7076

Closed
wants to merge 1 commit into from

Conversation

snazarkin
Copy link
Contributor

@snazarkin snazarkin commented Jan 14, 2022

This is the fix for the issue that was found during the test of arm32 (see JDK-8279300). Constant verification was added to the arm32 specific code but root cause was not fixed: the constant for logical AND op can't be encoded directly and should be loaded to a register. load_immediate function is sophisticated enough and able to generate LIR_Const on the platforms where it is possible, and load op for arm32.


Progress

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

Issue

  • JDK-8279301: c1 getObjectSize intrinsic should guard round mask constant

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7076/head:pull/7076
$ git checkout pull/7076

Update a local copy of the PR:
$ git checkout pull/7076
$ git pull https://git.openjdk.java.net/jdk pull/7076/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7076

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7076.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 14, 2022

👋 Welcome back snazarki! 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 Jan 14, 2022
@openjdk
Copy link

openjdk bot commented Jan 14, 2022

@snazarkin 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 Jan 14, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 14, 2022

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

I think all uses of logical_and should be reconsidered too. I see that LIRGenerator::load_immediate does additional checks for T_LONG on AArch64 and PPC64. But doing it right now would probably fail due to LIRGenerator::load_immediate accepting int, truncating the long mask!

I submitted the more generic bug here: https://bugs.openjdk.java.net/browse/JDK-8280003. Current ARM32 point fix looks fine, but you can also choose to close this one as duplicate, and help on more generic thing.

@@ -1420,7 +1420,9 @@ void LIRGenerator::do_getObjectSize(Intrinsic* x) {
#else
__ add(length_int, header_size, length_int);
if (round_mask != 0) {
__ logical_and(length_int, LIR_OprFact::intConst(~round_mask), length_int);
// generates LIR_Const if mask fits instruction requirement
Copy link
Member

Choose a reason for hiding this comment

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

I think the comment here is excessive, especially given other uses of logical_and that would probably get fixed too.

@openjdk
Copy link

openjdk bot commented Jan 14, 2022

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

8279301: c1 getObjectSize intrinsic should guard round mask constant

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

  • 84976b4: 8278549: UNIX sun/font coding misses SUSE distro detection on recent distro SUSE 15
  • 965c64b: 8279699: Parallel: More precise boundary in ObjectStartArray::object_starts_in_range
  • 35172cd: 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
  • 237f861: 8273143: Transition to _thread_in_vm when handling a polling page exception
  • 9209e6d: 8279877: Document IDEA IDE setup in docs/ide.md
  • 0a839b4: 8279801: EC KeyFactory and KeyPairGenerator do not have aliases for OID format
  • 6fcaa32: 8262442: (windows) Use all proxy configuration sources when java.net.useSystemProxies=true
  • c17a012: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java
  • b61a4af: 8259774: Deprecate -XX:FlightRecorderOptions:samplethreads
  • 6933934: 8278597: Remove outdated comments regarding RMISecurityManager in HotSpotAgent.java
  • ... and 61 more: https://git.openjdk.java.net/jdk/compare/6613ce64d76a6cc40fd933b022834098721b8d23...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 14, 2022
@snazarkin
Copy link
Contributor Author

Withdraw in favor of pr/7080

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 ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants