RFR: 8374744: Enable dumping of APX EGPRs (R16–R31) in JVM fatal error logs
Sandhya Viswanathan
sviswanathan at openjdk.org
Tue Jan 27 22:04:13 UTC 2026
On Wed, 7 Jan 2026 20:28:14 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
> The goal of this PR is to add support for printing the values of APX extended general-purpose registers (EGPRs, R16-R31) in hs_err_pid* crash logs on x86 platforms with APX support. The implementation detects APX support at runtime and attempts to dump the additional registers when available, improving post-mortem debugging capabilities.
src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp line 449:
> 447: // Dump APX EGPRs (R16-R31)
> 448: apx_state* apx = get_apx_state(uc);
> 449: if (UseAPX && apx != nullptr) {
This could be done as:
apx_state* apx = UseAPX ? get_apx_state(uc) : nullptr;
if (apx != nullptr) {
src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp line 469:
> 467: st->print(", R30=" INTPTR_FORMAT, (intptr_t)apx->regs[14]);
> 468: st->print(", R31=" INTPTR_FORMAT, (intptr_t)apx->regs[15]);
> 469: st->cr();
This could be done with a for loop.
src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp line 556:
> 554: CASE_PRINT_REG_APX(30, "R30=", 14); break;
> 555: CASE_PRINT_REG_APX(31, "R31=", 15); break;
> 556: }
Don't need a switch case here. Could be achieved with something like below:
st->print("R%d=", n);
print_location(st, apx->regs[n]);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29098#discussion_r2700175735
PR Review Comment: https://git.openjdk.org/jdk/pull/29098#discussion_r2733973731
PR Review Comment: https://git.openjdk.org/jdk/pull/29098#discussion_r2733989504
More information about the hotspot-dev
mailing list