RFR: 8270067: AArch64: several clhsdb tests fail with -Xcomp
Nick Gasson
ngasson at openjdk.java.net
Fri Jul 9 08:43:10 UTC 2021
Running the jtreg test serviceability/sa/ClhsdbWhere.java with -Xcomp
-XX:-TieredCompilation fails with the following exception:
Error: java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is null
java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is null
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.createStackValue(CompiledVFrame.java:270)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.getLocals(CompiledVFrame.java:107)
at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTMLForJavaStackTrace(HTMLGenerator.java:1937)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$43.doit(CommandProcessor.java:1573)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2090)
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2060)
The oop map for the frame being inspected is:
ScopeDesc(pc=0x0000ffff8957e000 offset=140):
jdk.test.lib.apps.LingeredApp::steadyState at 7 (line 536)
Locals
- l0: empty
- l1: reg rfp [58],oop
- l2: empty
Monitor stack
- @0: monitor{reg rfp [58],oop,stack[16]}
But RegisterMap::getLocation() returns a null Address for register
58 (=RFP).
This patch fixes two problems: the fp VMReg value used in
AARCH64Frame::updateMapWithSavedLink should be 29<<1 not 29 because a
VMReg has two slots in a 64-bit VM. The other bug is that
RegisterMap::setLocation and getLocation calculate the long
locationValid mask using (1 << (i % locationValidTypeSize)) where i and
locationValidTypeSize are both int. We need to do this calculation as a
long if i % locationValidTypeSize can be > 32. There's no failure on
x86_64 because that only has 16 integer registers.
-------------
Commit messages:
- 8270067: AArch64: several clhsdb tests fail with -Xcomp
Changes: https://git.openjdk.java.net/jdk/pull/4737/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4737&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8270067
Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/4737.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4737/head:pull/4737
PR: https://git.openjdk.java.net/jdk/pull/4737
More information about the serviceability-dev
mailing list