[jdk17u-dev] RFR: 8350106: [PPC] Avoid ticks_unknown_not_Java AsyncGetCallTrace() if JavaFrameAnchor::_last_Java_pc not set
Richard Reingruber
rrich at openjdk.org
Wed Sep 24 07:54:41 UTC 2025
This pull request contains a backport of commit [d5908231](https://github.com/openjdk/jdk21u-dev/commit/d5908231ebc16f443b3fc9b2ebf03cc4deb67373) from the [openjdk/jdk21u-dev](https://git.openjdk.org/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](https://github.com/openjdk/jdk17u-dev/blob/dca33960959f71ef646d346e328acd27196f5bef/src/hotspot/cpu/ppc/frame_ppc.inline.hpp#L61) is the one that takes `sp` as single argument. It reads the pc from the frames `lr` slot just as [`frame::setup()`](https://github.com/openjdk/jdk21u-dev/blob/43c84df4a3d73ca3b0aeddc738d2e2f0e9f5145a/src/hotspot/cpu/ppc/frame_ppc.inline.hpp#L40) in jdk21.
This pr depends on https://github.com/openjdk/jdk17u-dev/pull/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.
-------------
Commit messages:
- Use frame constructur that inits pc from the lr slot
- Rename frame::common_abi to frame::abi_minframe
- Order includes in thread_aix_ppc.cpp
- Backport d5908231ebc16f443b3fc9b2ebf03cc4deb67373
Changes: https://git.openjdk.org/jdk17u-dev/pull/3957/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3957&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8350106
Stats: 31 lines in 2 files changed: 21 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/3957.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3957/head:pull/3957
PR: https://git.openjdk.org/jdk17u-dev/pull/3957
More information about the jdk-updates-dev
mailing list