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
Fri Apr 22 07:49:01 UTC 2022


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 hotspot jtreg tier1, and RISCV tier1 is running.

Thanks,
Xiaolin

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

Commit messages:
 - Print files and lines in verify_oops*

Changes: https://git.openjdk.java.net/jdk/pull/8359/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8359&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8285435
  Stats: 67 lines in 12 files changed: 33 ins; 0 del; 34 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8359.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8359/head:pull/8359

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


More information about the hotspot-dev mailing list