Skip to content

Conversation

@sunny868
Copy link
Contributor

@sunny868 sunny868 commented Jun 1, 2021

Hi all,

Enable peephole can cause SIGSEGV sometimes in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 , so must set a removed-flags for the peephole-nodes , to avoid be set-live-bit() and cause crash.
Please review this trivial change.

Thanks,
Sun Guoyun


Progress

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

Issue

  • JDK-8267982: Set the node after peephole optimization to be removed

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4276

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 1, 2021

👋 Welcome back sunny868! 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 Jun 1, 2021
@openjdk
Copy link

openjdk bot commented Jun 1, 2021

@sunny868 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 Jun 1, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 1, 2021

@sunny868 sunny868 changed the title 8267982: Set the node after peephole optimization to be removed enable peephole cause SIGSEGV in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 Jun 1, 2021
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jun 1, 2021
@TobiHartmann
Copy link
Member

The PR title needs to match the JIRA bug title (including the bug number). Please also change it to something more descriptive (like the one you had previously).

@sunny868 sunny868 changed the title enable peephole cause SIGSEGV in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 8267982: Set the node after peephole optimization to be removed Jun 1, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 1, 2021
@sunny868 sunny868 changed the title 8267982: Set the node after peephole optimization to be removed 8267982: enable peephole cause SIGSEGV in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 Jun 1, 2021
@sunny868
Copy link
Contributor Author

@TobiHartmann what I need to do ?

@dean-long
Copy link
Member

I think Tobias was suggesting that you change both this PR's title and the JBS issue back to "8267982: Set the node after peephole optimization to be removed"

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.

To have new flag field in base class Node is expensive (size wise). I suggest to add it to MachNode on which peephole is executed.

Otherwise the fix is correct.

@sunny868 sunny868 changed the title 8267982: enable peephole cause SIGSEGV in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 8267982: Set the node after peephole optimization to be removed Jun 23, 2021
@sunny868
Copy link
Contributor Author

/test tier1

@openjdk
Copy link

openjdk bot commented Jun 24, 2021

@sunny868 you need to get approval to run the tests in tier1 for commits up until b5fc0dc

@sunny868
Copy link
Contributor Author

I made a mistake operation . I will fix it right away.

@sunny868
Copy link
Contributor Author

@TobiHartmann @vnkozlov can you help me ? I made a mistake to closed this PR, but now I can not re-open this PR.
My new commit is sunny868@00a73ec .

@dean-long
Copy link
Member

@sunny868 If you search for "reopen pull request after force push" you can find some helpful suggestions on how to fix this. From what I read, you need to do a another force push back to the previous PR state before it can be reopened. If all else fails, try opening a new PR.
Do we have any github/skara experts who can help with fixing this?

@sunny868 sunny868 reopened this Jun 25, 2021
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jun 25, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 25, 2021
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 good. I have only style fix comment.
I will test changes meanwhile because I don't see it passed through GitHub testing.

Comment on lines 469 to 474
if ( def->is_Mach() && def->as_Mach()->get_removed() ) {
//do nothing. peephole has removed the node.
} else {
if( OptoReg::is_valid(first) ) set_live_bit(tmp_live,first);
if( OptoReg::is_valid(second) ) set_live_bit(tmp_live,second);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code style. Use next pattern in code you modified (body on separate line and no spaces before/after condition):

if (cond) {
  foo;
}

We want to correct style in all places eventually as we work on code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

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.

Good.
Tier1-3 testing passed clean.

@openjdk
Copy link

openjdk bot commented Jun 25, 2021

⚠️ @sunny868 the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout 8267982
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Jun 25, 2021

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

8267982: Set the node after peephole optimization to be removed

Reviewed-by: kvn, thartmann

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

  • 4fbcce1: 8269886: Inaccurate error message for compressed hprof test
  • a96012f: 8269803: G1: remove unnecessary NoRefDiscovery
  • 4e18ec2: 8269993: [Test]: java/net/httpclient/DigestEchoClientSSL.java contains redundant @run tags
  • e54585b: 8268363: AArch64: Implement string_indexof_char intrinsic in SVE
  • 270fbcb: Merge
  • c812bbb: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output
  • 6000950: 8269185: Directories in /opt/runtimepackagetest and /path/to/jdk-17 are different
  • 1f2bf1d: 8269879: [PPC64] C2: Math.rint intrinsic uses wrong rounding mode
  • 7fcd5ca: 8266036: class file for sun.misc.Contended not found
  • a49b1dc: 8269772: [macos-aarch64] test compilation failed with "SocketException: No buffer space available"
  • ... and 583 more: https://git.openjdk.java.net/jdk/compare/ce44cd6881bcbef81a840d7961a951ba586c0eae...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 (@vnkozlov, @TobiHartmann) 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 Jun 25, 2021
@sunny868
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 25, 2021
@openjdk
Copy link

openjdk bot commented Jun 25, 2021

@sunny868
Your change (at version 9be0de1) is now ready to be sponsored by a Committer.

@sunny868
Copy link
Contributor Author

@vnkozlov Could you please sponsor it for me?

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Otherwise, it looks good to me.

@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Jul 5, 2021
Copy link
Member

@TobiHartmann TobiHartmann 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.

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.

Update is good.

@sunny868
Copy link
Contributor Author

sunny868 commented Jul 8, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 8, 2021
@openjdk
Copy link

openjdk bot commented Jul 8, 2021

@sunny868
Your change (at version a289641) is now ready to be sponsored by a Committer.

@sunny868
Copy link
Contributor Author

sunny868 commented Jul 8, 2021

@vnkozlov @TobiHartmann Could you please sponsor it for me?

@TobiHartmann
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 8, 2021

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

  • 4fbcce1: 8269886: Inaccurate error message for compressed hprof test
  • a96012f: 8269803: G1: remove unnecessary NoRefDiscovery
  • 4e18ec2: 8269993: [Test]: java/net/httpclient/DigestEchoClientSSL.java contains redundant @run tags
  • e54585b: 8268363: AArch64: Implement string_indexof_char intrinsic in SVE
  • 270fbcb: Merge
  • c812bbb: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output
  • 6000950: 8269185: Directories in /opt/runtimepackagetest and /path/to/jdk-17 are different
  • 1f2bf1d: 8269879: [PPC64] C2: Math.rint intrinsic uses wrong rounding mode
  • 7fcd5ca: 8266036: class file for sun.misc.Contended not found
  • a49b1dc: 8269772: [macos-aarch64] test compilation failed with "SocketException: No buffer space available"
  • ... and 583 more: https://git.openjdk.java.net/jdk/compare/ce44cd6881bcbef81a840d7961a951ba586c0eae...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 8, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Jul 8, 2021
@openjdk
Copy link

openjdk bot commented Jul 8, 2021

@TobiHartmann @sunny868 Pushed as commit 2c883ee.

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

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 test-request

Development

Successfully merging this pull request may close these issues.

4 participants