Skip to content

Conversation

reinrich
Copy link
Member

@reinrich reinrich commented Sep 19, 2025

This pull request contains a backport of commit d5908231 from the openjdk/jdk21u-dev repository.

There are a few trivial adaptations

  • of copyright headers
  • of the hunk that includes os.inline.hpp because of a diff in the context
  • and because frame::abi_minframe was renamed frame::common_abi in higher releases

In addition to these there's a non-trivial adaptation. In jdk17, we cannot use the frame constructor that takes a pc as 2nd argument because it requires it not to be nullptr. The appropriate frame constructor to use is the one that takes sp as single argument. It reads the pc from the frames lr slot just as frame::setup() in jdk21.

This pr depends on #3949.

Risk is low because the patch is small and ppc only and the changed method JavaThread::pd_get_top_frame_for_profiling() is only used when profiling with jfr or async-profiler.

The backport passed our CI testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.
Testing was done with fastdebug builds on the main platforms and also on Linux/PPC64le.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • JDK-8350106 needs maintainer approval
  • Commit message must refer to an issue

Issue

  • JDK-8350106: [PPC] Avoid ticks_unknown_not_Java AsyncGetCallTrace() if JavaFrameAnchor::_last_Java_pc not set (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3957/head:pull/3957
$ git checkout pull/3957

Update a local copy of the PR:
$ git checkout pull/3957
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3957/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3957

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3957.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 19, 2025

👋 Welcome back rrich! 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
Copy link

openjdk bot commented Sep 19, 2025

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

8350106: [PPC] Avoid ticks_unknown_not_Java AsyncGetCallTrace() if JavaFrameAnchor::_last_Java_pc not set

Reviewed-by: mdoerr

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 47 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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport d5908231ebc16f443b3fc9b2ebf03cc4deb67373 8350106: [PPC] Avoid ticks_unknown_not_Java AsyncGetCallTrace() if JavaFrameAnchor::_last_Java_pc not set Sep 19, 2025
@openjdk
Copy link

openjdk bot commented Sep 19, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Sep 19, 2025
@reinrich reinrich marked this pull request as ready for review September 24, 2025 07:49
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 24, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 24, 2025

Webrevs

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.

Looks correct. Thanks for backporting!

return false;
}
// The last java pc will be found in the abi part of the last java frame.
*fr_addr = frame(sp);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a big fan of this diff, but the alternatives (changing frame constructor or determining pc here) are probably not better. So, ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

@openjdk
Copy link

openjdk bot commented Sep 29, 2025

⚠️ @reinrich This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Port of a pull request already in a different code base 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