Integrated: 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
Tue Apr 26 00:00:53 UTC 2022


On Fri, 22 Apr 2022 07:41:29 GMT, Xiaolin Zheng <xlinzheng 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

This pull request has now been integrated.

Changeset: 4bf2c18d
Author:    Xiaolin Zheng <xlinzheng at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/4bf2c18d6c2b4e54c27fb557e679b9c24e09c0e7
Stats:     67 lines in 12 files changed: 33 ins; 0 del; 34 mod

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

Reviewed-by: ngasson, fyang

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

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


More information about the hotspot-compiler-dev mailing list