On Mon, 1 Dec 2025 23:38:20 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> We've fixed mixed mode jstack for the debuggee running with `-Xcomp` in 
>> [JDK-8370176](https://bugs.openjdk.org/browse/JDK-8370176), but it was not 
>> enough. We need to handle like unifying `CFrame` and `Frame` in stack 
>> unwinding as possible, and need to change how to get caller SP/FP from stack.
>> 
>> This PR works fine on both Linux AMD64 and Linux AArch64. All of 
>> `hotspot/jtreg/serviceability/sa` tests have been passed on both platforms.
>> 
>> Big thanks to @pchilano for your help!
>
> Yasumasa Suenaga has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update 
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java
>   
>   Co-authored-by: Chris Plummer <[email protected]>

> This PR works fine on both Linux AMD64 and Linux AArch64. All of 
> hotspot/jtreg/serviceability/sa tests have been passed on both platforms.

@YaSuenag it doesn't seem to work on macOS however. We get an exception moving 
from the native frames to Java frames:


"Reference Handler" #15 daemon prio=10 tid=0x00000009f3091e10 nid=29955 waiting 
on condition [0x000000017059e000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked
0x00000001890b64f8              ????????
0x00000001083f8810      __ZN15PlatformMonitor4waitEy + 0x94
0x000000010836f60c      __ZN7Monitor4waitEy + 0x154
0x0000000107fa19dc      _JVM_WaitForReferencePendingList + 0x108
0x00000001192b5a48      sun.jvm.hotspot.utilities.UnsupportedPlatformException
        at 
jdk.hotspot.agent/sun.jvm.hotspot.debugger.cdbg.CFrame.toFrame(CFrame.java:78)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.getJavaNames(PStack.java:248)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:135)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:65)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.PStack.run(PStack.java:60)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.run(JStack.java:67)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:306)
        at 
jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)

Bug is being filed

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28284#issuecomment-3614262403

Reply via email to