On Thu, 15 Jan 2026 00:49:59 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> 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).

"NoFramePointerJNIFib" #28 prio=5 tid=0x0000023fa4432290 nid=20612 runnable 
[0x000000d0370fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_in_native
0x00007ffbe5fd10a8      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xa8
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10db      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xdb
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd10d0      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0xd0
0x00007ffbe5fd101d      NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI 
+ 0x1d
0x0000023f9300fcf8      * 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)
0x0000023f93001952      <StubRoutines (initial stubs)>
0x0000023f93009300      * LingeredAppWithNativeMethod.callNative() bci:47 
line:54 (Interpreted frame)
                        * LingeredAppWithNativeMethod.callback(long) bci:8 
line:63 (Interpreted frame)
0x0000023f93001952      <StubRoutines (initial stubs)>
0x0000023f93009300      * LingeredAppWithNativeMethod.callNative() bci:47 
line:54 (Interpreted frame)
                        * 
LingeredAppWithNativeMethod.lambda$main$0(LingeredAppWithNativeMethod) bci:1 
line:71 (Interpreted frame)
                        * 
LingeredAppWithNativeMethod$$Lambda+0x000000002b040b00.run() bci:4 (Interpreted 
frame)
                        * java.lang.Thread.runWith(java.lang.Object, 
java.lang.Runnable) bci:5 line:1529 (Interpreted frame)
                        * java.lang.Thread.run() bci:19 line:1516 (Interpreted 
frame)
0x0000023f93001952      <StubRoutines (initial stubs)>
0x00007ffbc6d047c8      jvm!JavaCalls::call_helper + 0x3f8
0x00007ffbc72189ec      jvm!os::os_exception_wrapper + 0x2c
0x00007ffbc6d05773      jvm!JavaCalls::call_virtual + 0x223
0x00007ffbc6d05b53      jvm!JavaCalls::call_virtual + 0x93
0x00007ffbc6e2f192      jvm!thread_entry + 0x82
0x00007ffbc6d3dce1      jvm!JavaThread::thread_main_inner + 0x261
0x00007ffbc747f15e      jvm!Thread::call_run + 0x1be
0x00007ffbc7216ec4      jvm!thread_native_entry + 0xc4
0x00007ffbee504ea0      ucrtbase!wcsrchr + 0x1f0
0x00007ffbf03ddbe7      KERNEL32!BaseThreadInitThunk + 0x17
0x00007ffbf1165a6c      ntdll!RtlUserThreadStart + 0x2c

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

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

Reply via email to