RFR: 8285435: Show file and line in MacroAssembler::verify_oop for AArch64 and RISC-V platforms (Port from x86)

Xiaolin Zheng xlinzheng at openjdk.java.net
Mon Apr 25 02:37:22 UTC 2022


On Fri, 22 Apr 2022 09:23:43 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

>> Hi team,
>> 
>> Could I have a review of this patch?
>> 
>> This patch ports useful [JDK-8239492](https://bugs.openjdk.java.net/browse/JDK-8239492) and [JDK-8255900](https://bugs.openjdk.java.net/browse/JDK-8255900) to AArch64 and RISC-V platforms, to show exact files and lines when `verify_oop` fails. It is very useful for debugging broken oops.
>> 
>> Add one `__ verify_oops()` in `aarch64.ad` and `riscv.ad` to deliberately crash the VM to see the result:
>> 
>> Before: 
>> 
>> build/linux-aarch64-server-slowdebug/images/jdk/bin/java -XX:+VerifyOops -jar demo-0.0.1-SNAPSHOT.jar
>> ......
>> #  Internal Error (/home/yunyao.zxl/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2553), pid=420, tid=425
>> #  fatal error: DEBUG MESSAGE: verify_oop: c_rarg1: broken oop
>> 
>> 
>> After:
>> 
>> build/linux-aarch64-server-slowdebug/images/jdk/bin/java -XX:+VerifyOops -jar demo-0.0.1-SNAPSHOT.jar
>> ...
>> #  Internal Error (/home/yunyao.zxl/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2553), pid=420, tid=425
>> #  fatal error: DEBUG MESSAGE: verify_oop: c_rarg1: broken oop r1 (/home/yunyao.zxl/jdk/src/hotspot/cpu/aarch64/aarch64.ad:1907)
>> 
>> 
>> Tested AArch64 and RISC-V hotspot jtreg tier1.
>> 
>> Thanks,
>> Xiaolin
>
> Looks OK.

Thank you for reviewing! @nick-arm @RealFYang

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

PR: https://git.openjdk.java.net/jdk/pull/8359


More information about the hotspot-compiler-dev mailing list