RFR: 8346706: RISC-V: Add available registers to hs_err

Robbin Ehn rehn at openjdk.org
Fri Dec 20 17:25:38 UTC 2024


On Fri, 20 Dec 2024 12:43:05 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi please consider.
>> 
>> This adds below to hs_err:
>> 
>> Floating point state:
>> fcsr=1
>> Floating point registers:
>> f0=0xffffffff44a72000 | 1.84467e+19
>> f1=0xffffffff44a72000 | 1.84467e+19
>> ....
>> f31=0xffffffff44a72000 | 1.84467e+19
>> 
>> Vector state:
>> vstart=0x0000000000000000
>> vl=0x0000000000000020
>> vtype=0x0000000000000000
>> vcsr=0x0000000000000000
>> vlenb=0x0000000000000020
>> Vector registers:
>> v0=0x0101010101010101010101010101010101010101010101010101010101010101
>> ....
>> v31=0x0101010101010101010101010101010101010101010101010101010101010101
>> 
>> 
>> To get vector the headers need to include those structures, hence build files hackery.
>> This means if you compile on a kernel without RVV support the error handler will lack support for it.
>> We don't care about RVV option as carshing in native may still use vector even if the jit do not.
>> 
>> I'm doubt full about the printing as double for fp regs, maybe that should be removed.
>> 
>> Local testing, running t1 over weekend.
>> 
>> Thanks, Robbin
>
> src/hotspot/os_cpu/linux_riscv/os_linux_riscv.cpp line 360:
> 
>> 358:   for (int r = 0; r < 32; r++) {
>> 359:     st->print_cr("f%d=" INTPTR_FORMAT " | %g", r, (intptr_t)f_ext_state->__f[r], (double)f_ext_state->__f[r]);
>> 360:   }
> 
> single float is also common, it's helpful to print them too if we already print double.

But should we print them in any format ? I'm thinking about removing double print?

> src/hotspot/os_cpu/linux_riscv/os_linux_riscv.cpp line 364:
> 
>> 362: 
>> 363: #ifdef NO_RVV_SIGCONTEXT
>> 364:     st->print_cr("Vector state: JVM compiled without vector sigcontext support");
> 
> indent

Fixed

> src/hotspot/os_cpu/linux_riscv/os_linux_riscv.cpp line 420:
> 
>> 418:   }
>> 419:   st->cr();
>> 420: #endif
> 
> Suggestion:
> 
> #endif // #ifdef NO_RVV_SIGCONTEXT

Fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22845#discussion_r1894195691
PR Review Comment: https://git.openjdk.org/jdk/pull/22845#discussion_r1894195247
PR Review Comment: https://git.openjdk.org/jdk/pull/22845#discussion_r1894198244


More information about the hotspot-runtime-dev mailing list