RFR: 8374469: Mixed jstack does not work on Windows [v2]

Yasumasa Suenaga ysuenaga at openjdk.org
Thu Jan 15 00:51:59 UTC 2026


On Wed, 14 Jan 2026 22:46:58 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Thanks, added.
>
> On windows-x64 I'm seeing about 25 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI frames. On other platforms I see just one Java_LingeredAppWithNativeMethod_callJNI frame, and a couple of fib() frames above it. Maybe this difference is just native compiler inlining and tail call elimination, but wanted to point it out just to make sure it is correct.

On my Windows 11 25H2, mixed jstack works correctly like following:

  <snip>

0x00007ff8105c10c4      NoFramePointer!fib + 0x28
0x00007ff8105c10c4      NoFramePointer!fib + 0x28
0x00007ff8105c101d      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0x1d
0x000001c5903afbf8      * LingeredAppWithNativeMethod.callJNI(java.lang.Object, int) bci:0 (Interpreted frame)
                        * LingeredAppWithNativeMethod.callNative() bci:47 line:54 (Interpreted frame)
                        * LingeredAppWithNativeMethod.callback(long) bci:8 line:63 (Interpreted frame)

  <snip>


Do you mean multiple jstacks are shown in .jtr file with message such as "DEBUG: Iteration: 1 - Test didn't trigger interesting condition." ? If yes, I think it is expected.

TestJhsdbJstackMixed.java seems to check at `isFibAndAlignedAddress` whether instruction address (PC) is aligned or not. I saw the condition is met in early on Linux x64, but it seems to take some calls on Windows x64. I'm not sure why we need to check this (I checked [JDK-8208091](https://bugs.openjdk.org/browse/JDK-8208091) which introduced it, but I haven't yet understood the reason).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29019#discussion_r2692562088


More information about the serviceability-dev mailing list