On Thu, 18 Dec 2025 00:17:02 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/aarch64/BsdAARCH64CFrame.java >> line 99: >> >>> 97: CodeBlob currentBlob = cc.findBlobUnsafe(pc()); >>> 98: >>> 99: // This case is different from HotSpot. See JDK-8371194 for >>> details. >> >> Looks good overall I think. >> What does "different from HotSpot" mean? >> I see we used that phrase in 8371194 also in LinuxAARCH64CFrame.java >> Maybe it is saying that these codeBlobs are handled differently from other >> code? > > Yes. We were trying to implement similar code with NativeStackPrinter used in > generating hs_err log in HotSpot, but this condition is different with it. > > Comments in 8371195 says: >> The special case for currentBlob.isContinuationStub() || >> currentBlob.isNativeMethod()) is needed compared to >> os::get_sender_for_C_frame because, unlike in the VM, here we are walking >> those frames as native C frames. Without the special case we depend on >> nextFP which might not be valid unless -XX:+PreserveFramePointer is used. > > In os_bsd_aarch64.cpp, comment of `get_sender_for_C_frame()` says JVM > compiled with `-fno-omit-frame-pointer`, but we can override `CFLAGS` with > configure options. Thus I think it is better to align with Linux AArch64. > Actually I heard this code works fine on Mac AArch64 - mixed jstack unwinded > native methods successfully like > `java.lang.ref.Reference.waitForReferencePendingList()`. OK, so this is different to the HotSpot NativeStackPrinter and the frame::next_frame() method. As we already have the comment in a similar method maybe no need to change it here. Thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28686#discussion_r2630228294
