RFR: 8374469: Mixed jstack does not work on Windows [v2]
Yasumasa Suenaga
ysuenaga at openjdk.org
Sat Jan 10 02:01:39 UTC 2026
On Fri, 9 Jan 2026 20:24:15 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Fix split pattern for Windows
>> - Tweak toFrame()
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windows/amd64/WindowsAMD64CFrame.java line 62:
>
>> 60: // However it would not work for dynamic generated code like CodeBlob because
>> 61: // HotSpot would not register unwind info like RtlAddFunctionTable().
>> 62: // Thus SA should check whether current PC is in CodeCache at first when nextPC is null.
>
> Suggestion:
>
> // The Windows GetStackTrace() Debug API can unwind the frame when given SP, FP, and PC.
> // However it will not work for dynamic generated code like CodeBlob because
> // HotSpot will not register unwind info like RtlAddFunctionTable().
> // Thus SA should first check whether current PC is in the CodeCache when nextPC is null.
Thank you! Applied.
> test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixed.java line 53:
>
>> 51: .compile(LINE_MATCHER_STR);
>> 52: private static final String HEX_STR_PATTERN = "0x([a-fA-F0-9]+)";
>> 53: private static final String FIB_SPLIT_PATTERN = "(NoFramePointer!)?" + NATIVE_FUNCTION_NAME
>
> It's unclear to me where NoFramePointer is coming from, and why this works on linux too.
"NoFramePointer" is DLL name which is used in this test. Module (DLL) name added as prefix in mixed jstack on Windows. Thus I added it to regex pattern. It is regex pattern, I defined it as a group, and added `?` to it, so it works if module name does not appear like Linux.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29019#discussion_r2678169816
PR Review Comment: https://git.openjdk.org/jdk/pull/29019#discussion_r2678168181
More information about the serviceability-dev
mailing list