Integrated: 8369322: Implement native stack printing for Windows-AArch64
Saint Wesonga
duke at openjdk.org
Wed Oct 22 07:49:20 UTC 2025
On Tue, 7 Oct 2025 22:19:47 GMT, Saint Wesonga <duke at openjdk.org> wrote:
> HAVE_PLATFORM_PRINT_NATIVE_STACK is not defined on Windows AArch64. Consequently, Windows AArch64 uses the [implementation of os::platform_print_native_stack that returns false](https://github.com/openjdk/jdk/blob/b50c11f9077f071cf5639de7e82ec261e0338532/src/hotspot/share/runtime/os.inline.hpp#L36-L41). This results in [NativeStackPrinter::print_stack](https://github.com/openjdk/jdk/blob/b50c11f9077f071cf5639de7e82ec261e0338532/src/hotspot/share/utilities/nativeStackPrinter.cpp#L32) having to call [NativeStackPrinter::print_stack_from_frame](https://github.com/openjdk/jdk/blob/b50c11f9077f071cf5639de7e82ec261e0338532/src/hotspot/share/utilities/nativeStackPrinter.hpp#L99-L106) instead. However, the context is null in that case. As a result, the [frame used for printing the stack](https://github.com/openjdk/jdk/blob/b50c11f9077f071cf5639de7e82ec261e0338532/src/hotspot/share/utilities/nativeStackPrinter.hpp#L103) is obtained from [os::current_frame()](https://github.com/openjdk/jdk/b
lob/b50c11f9077f071cf5639de7e82ec261e0338532/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp#L165-L168), which returns an empty frame. The frame's pc() method returns `nullptr` and `Native frames: <unavailable>` is printed.
>
> This change defines the `os::platform_print_native_stack` method for Windows AArch64 and adapts the implementation of the Windows x64 `os::win32::platform_print_native_stack` method to support Windows AArch64.
This pull request has now been integrated.
Changeset: eff4b110
Author: Saint Wesonga <saint.wesonga at microsoft.com>
Committer: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/eff4b1103396dc8e383d86472435ff983e298b61
Stats: 202 lines in 3 files changed: 110 ins; 92 del; 0 mod
8369322: Implement native stack printing for Windows-AArch64
Reviewed-by: dholmes, karianna
-------------
PR: https://git.openjdk.org/jdk/pull/27680
More information about the hotspot-runtime-dev
mailing list