Skip to content

Conversation

@lgxbslgx
Copy link
Member

@lgxbslgx lgxbslgx commented May 11, 2023

Hi all,

This patch revises the code of ps_proc.c::process_get_lwp_regs
to use PTRACE_GETREGSET first instead of PTRACE_GETREGS.
The PTRACE_GETREGS is not present on all architectures as the man page states [1].
And if we use PTRACE_GETREGS first, several tests will fail at the special envs,
such as my local riscv64-linux env. Please see the issue for more information.

And I remove the unnecessary comments and macro,
because the sparc arch related code had been removed.

Thanks for the review.

Best Regards,
-- Guoxiong

[1] https://man7.org/linux/man-pages/man2/ptrace.2.html


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8307955: Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs'

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13939

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 11, 2023

👋 Welcome back gli! 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 changed the title JDK-8307955 8307955: Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs' May 11, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label May 11, 2023
@openjdk
Copy link

openjdk bot commented May 11, 2023

@lgxbslgx The following label will be automatically applied to this pull request:

  • serviceability

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 serviceability serviceability-dev@openjdk.org label May 11, 2023
@mlbridge
Copy link

mlbridge bot commented May 11, 2023

Webrevs

@plummercj
Copy link
Contributor

/reviewers 2

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

Changes look good. I tested with our internal test system on all supported platforms and did not see any issues.

@openjdk
Copy link

openjdk bot commented May 16, 2023

@plummercj
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@lgxbslgx
Copy link
Member Author

@plummercj Thanks for your test and review.

Waiting for another review.

Copy link
Contributor

@kevinjwalls kevinjwalls 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 to me.

@openjdk
Copy link

openjdk bot commented May 16, 2023

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

8307955: Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs'

Reviewed-by: cjplummer, kevinw

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

  • 72294c5: 8308024: HttpClient (HTTP/1.1) sends an extraneous empty chunk if the BodyPublisher supplies an empty buffer
  • c9b6bb5: 8308041: [JVMCI] WB_IsGCSupportedByJVMCICompiler must enter correct JVMCI env
  • 0790f70: 8306806: JMX agent with JDP enabled won't start when PerfData is disabled
  • c2ef302: 8307968: serviceability/jvmti/vthread/StopThreadTest/StopThreadTest.java timed out
  • d22bcc8: 8307403: java/util/zip/DeInflate.java timed out
  • 2210e06: 8306638: Open source some AWT tests related to datatransfer and Toolkit
  • 05b51c7: 8307567: Avoid relocating global roots to metaspaceObjs in CDS dump
  • 3168372: 8306597: Improve string formatting in EquivMapsGenerator.java
  • 7b0b9b5: 8308049: Refactor nested class declarations in FdLibm.java
  • cc80ada: 8306593: Fix nsk/jdi/stop/stop001 for virtual threads and remove from problem list
  • ... and 82 more: https://git.openjdk.org/jdk/compare/4aa65cbeefe44f29fbe6ea013809dcee579df9ff...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 May 16, 2023
@lgxbslgx
Copy link
Member Author

@plummercj @kevinjwalls Thanks for the reviews. Integrating.
/integrate

@openjdk
Copy link

openjdk bot commented May 17, 2023

Going to push as commit 2f1c654.
Since your change was applied there have been 109 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 May 17, 2023
@openjdk openjdk bot closed this May 17, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 17, 2023
@openjdk
Copy link

openjdk bot commented May 17, 2023

@lgxbslgx Pushed as commit 2f1c654.

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

@lgxbslgx lgxbslgx deleted the JDK-8307955 branch May 17, 2023 03:20
@luhenry
Copy link
Member

luhenry commented Jan 22, 2024

/backport jdk17u-dev

@openjdk
Copy link

openjdk bot commented Jan 22, 2024

@luhenry the backport was successfully created on the branch backport-luhenry-2f1c6548 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2f1c6548 from the openjdk/jdk repository.

The commit being backported was authored by Guoxiong Li on 17 May 2023 and was reviewed by Chris Plummer and Kevin Walls.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git backport-luhenry-2f1c6548:backport-luhenry-2f1c6548
$ git checkout backport-luhenry-2f1c6548
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git backport-luhenry-2f1c6548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants