Skip to content

8299683: [S390X] Problems with -XX:+VerifyStack#12161

Closed
sid8606 wants to merge 3 commits intoopenjdk:masterfrom
sid8606:verify_stack
Closed

8299683: [S390X] Problems with -XX:+VerifyStack#12161
sid8606 wants to merge 3 commits intoopenjdk:masterfrom
sid8606:verify_stack

Conversation

@sid8606
Copy link
Member

@sid8606 sid8606 commented Jan 24, 2023

Deoptimization and uncommon trap stubs require last Java PC to point to a PC which has an appropriate OopMap. Adjusting a offset for PC in last java frame.


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12161

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

Using diff file

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

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Jan 24, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2023

Hi @sid8606, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user sid8606" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Jan 24, 2023

@sid8606 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 24, 2023
@sid8606
Copy link
Member Author

sid8606 commented Jan 24, 2023

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Jan 24, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2023

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@sid8606 sid8606 changed the title 8299683: [s390] Problems with -XX:+VerifyStack 8299683: [S390X] Problems with -XX:+VerifyStack Jan 24, 2023
@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Jan 26, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 26, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 26, 2023

Webrevs


// let the unpacker layout information in the skeletal frames just allocated.
__ get_PC(Z_RET);
offs = __ offset();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we use the offset from above instead of the current one? (PPC64 does that.) I think this line should get removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have tried that using same offset from above instead current one but it's not pointing to correct PC for oop Maps.

Copy link
Contributor

Choose a reason for hiding this comment

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

Setting last_Java_pc = pc() + current offset looks weird. Could it be that this breaks something which prevents the failure from happening? E.g. pointing to somewhere outside the deopt blob?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can't use this get_PC version for the intended purpose. It doesn't set Z_RET = start pc + offs which is what you probably wanted.

Copy link
Member Author

@sid8606 sid8606 Feb 3, 2023

Choose a reason for hiding this comment

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

if Z_RET = start pc + offs can not be used then let me explore on how to get that offset on s390x.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr Feb 4, 2023

Choose a reason for hiding this comment

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

I think something like __ get_PC(Z_RET, oop_map_offs - __ offset()); should work with oop_map_offs taken from above where the add_gc_map is used.

Copy link
Member Author

Choose a reason for hiding this comment

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

@TheRealMDoerr I have tried your suggestion and it' s works. I am not seeing any regressions. Added a commit for this change.

// `Deoptimization::uncommon_trap' expects it and considers its
// sender frame as the deoptee frame.
__ get_PC(Z_R1_scratch);
int offs = __ offset();
Copy link
Contributor

Choose a reason for hiding this comment

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

generate_uncommon_trap_blob() has no oop_maps on s390. Most other platforms have them. I think this part of the change doesn't make sense without oop_maps.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your comments, I have Addressed this comment in another commit.

Remove offset changes from generate_uncommon_trap_blob stub
as it has no oop_maps on s390x.
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.

LGTM.

@openjdk
Copy link

openjdk bot commented Feb 6, 2023

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

8299683: [S390X] Problems with -XX:+VerifyStack

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 236 new commits pushed to 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.

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 (@TheRealMDoerr, @RealLucy) 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 Feb 6, 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.

Change looks good to me.
Thank you for getting this straight!

@sid8606
Copy link
Member Author

sid8606 commented Feb 6, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 6, 2023
@openjdk
Copy link

openjdk bot commented Feb 6, 2023

@sid8606
Your change (at version 43a64f0) is now ready to be sponsored by a Committer.

@RealLucy
Copy link
Contributor

RealLucy commented Feb 6, 2023

/sponsor

I decided to sponsor since @TheRealMDoerr is currently on and off.

@openjdk
Copy link

openjdk bot commented Feb 6, 2023

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 6, 2023

@RealLucy @sid8606 Pushed as commit 9c80b8a.

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

@sid8606 sid8606 deleted the verify_stack branch June 22, 2023 13:36
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