On Mon, 2 Mar 2026 02:48:00 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> SA supports DWARF in jhsdb to unwind native call frames on Linux AMD64. It >> is better if DWARF is supported on other architectures. This RFE aims to >> implement it on AArch64. >> >> This make a big change, so I assembled in 5 commits: >> >> - Unify terminology to "sender" >> - >> https://github.com/YaSuenag/jdk/commit/9cab52f778a678b283533fa2129bdec378111abb >> - Several words ("next", "sender", no prefix) are used around frame >> related code in SA, >> thus the commit unified to "sender" to follow manner in HotSpot. >> - Separate DWARF implementation from Linux AMD64 >> - >> https://github.com/YaSuenag/jdk/commit/6c90a74e507bc6cf7068b4d74ffded6d516e4865 >> - DWARF related code can be separate as platform-independent. >> - ~~DWARF parser improvement~~ **Done in >> [JDK-8377947](https://bugs.openjdk.org/browse/JDK-8377947)** >> - >> ~~https://github.com/YaSuenag/jdk/commit/979eb7c0dc87c057fb1c0ca88c4ea217d04f09ca~~ >> - ~~Track all of registers' offset from CFA~~ >> - ~~Remember states when DWARF parser see `DW_CFA_restore_state` in each >> time~~ >> - Use DWARF on AArch64 >> - >> https://github.com/YaSuenag/jdk/commit/b4bd2f3f372cfe2a796a558a4eeada0d57318067 >> - Ignore PAC (PACA) >> - >> https://github.com/YaSuenag/jdk/commit/8ad3ee82da34a3a6ff0407997904079cced5f9f3 >> - Ignore AArch64 specific DWARF instructions >> (`DW_CFA_AARCH64_negate_ra_state`, `DW_CFA_AARCH64_negate_ra_state_with_pc`, >> `DW_CFA_AARCH64_set_ra_state`) >> - Mixed jstack might not work on PAC (Pointer Authentication Code) >> enabled platform (it is same with current SA) because SA does not decode >> PAC. We need to support it if possible (but I do not have PAC enabled Linux >> machines). >> - And also this commit disables TestJhsdbJstackMixedCore.java on AArch64 >> because it does not work on Fedora 43 AArch64. PC (program counter) points >> out of function in some case because the another function begins immediately >> after the end of interest function. If the function ends with `bl`, PC >> points beginning of next function. (I confirmed that with assembly code >> generated by GCC 15) >> >> >> I tested this change on following platforms: >> - Fedora 43 AMD64 >> - Oracle Linux 8.10 AMD64 >> - Fedora 43 AArch64 >> - Rocky Linux 9.5 AArch64 >> >> I tested serviceability/sa on each platforms. On Fedora 43 AArch64 on >> Raspberry Pi 4, TestJhsdbJstackMixedWithXComp.java timed out, but I believe >> it was caused by machine performance. I didn't see any warnings/errors on >> other platforms. In addition, my crash examples ... > > Yasumasa Suenaga has updated the pull request incrementally with one > additional commit since the last revision: > > Define HWCAP_CAPA if it does not exist src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c line 45: > 43: // > https://sourceware.org/git/?p=glibc.git;a=commit;h=a2e57f89a35e6056c9488428e68c4889e114ef71 > 44: #if defined(__aarch64__) && !defined(HWCAP_PACA) > 45: HWCAP_PACA (1 << 30) Suggestion: #define HWCAP_PACA (1 << 30) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29731#discussion_r2870583258
