RFR: 8289743: AArch64: Clean up patching logic [v8]
Nick Gasson
ngasson at openjdk.org
Fri Jul 15 15:47:06 UTC 2022
On Fri, 15 Jul 2022 15:05:52 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> The current logic for patching is a mess of if-then-elses. By rearranging the logic and using a switch we can make it both easier to understand and faster.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>
> 8289743: AArch64: Clean up patching logic
I ran tier1-3 with the latest version and hit a couple of crashes:
runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
# Internal Error (/home/ent-user/ci-scripts/jdk_build/jdk_src/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:355), pid=387892, tid=387895
# assert(address_is == target) failed: should be
[..snip..]
Stack: [0x0000ffff9b56f000,0x0000ffff9b76f000], sp=0x0000ffff9b768c20, free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x145fd44] MacroAssembler::pd_patch_instruction_size(unsigned char*, unsigned char*)+0xe4
V [libjvm.so+0x177e5a0] Relocation::pd_set_data_value(unsigned char*, long, bool)+0x40
V [libjvm.so+0x17788c0] external_word_Relocation::fix_relocation_after_move(CodeBuffer const*, CodeBuffer*)+0x8c
V [libjvm.so+0xa6c204] CodeBuffer::relocate_code_to(CodeBuffer*) const+0x470
V [libjvm.so+0xa6f3f4] CodeBuffer::copy_code_to(CodeBlob*)+0x90
V [libjvm.so+0x15c33c4] nmethod::nmethod(Method*, CompilerType, int, int, CodeOffsets*, CodeBuffer*, int, ByteSize, ByteSize, OopMapSet*)+0x1e0
compiler/unsafe/UnsafeGetConstantField.java
# SIGSEGV (0xb) at pc=0x0000ffff8585c71c, pid=198485, tid=198515
#
# JRE version: OpenJDK Runtime Environment (20.0) (fastdebug build 20-internal-git-006c68ae4)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 20-internal-git-006c68ae4, mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x17bb71c] ScopeDesc::decode_object_values(int)+0xec
#
[..snip..]
Stack: [0x0000ffff6016d000,0x0000ffff6036d000], sp=0x0000ffff60366e80, free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x17bb71c] ScopeDesc::decode_object_values(int)+0xec
V [libjvm.so+0x17bb868] ScopeDesc::ScopeDesc(CompiledMethod const*, PcDesc*, bool)+0x48
V [libjvm.so+0x15bec58] nmethod::scope_desc_in(unsigned char*, unsigned char*)+0xe8
V [libjvm.so+0x15c2990] nmethod::decode2(outputStream*) const+0x600
V [libjvm.so+0xb7ae74] disnm+0x164
V [libjvm.so+0x145fd0c] MacroAssembler::pd_patch_instruction_size(unsigned char*, unsigned char*)+0xac
V [libjvm.so+0x177e5a0] Relocation::pd_set_data_value(unsigned char*, long, bool)+0x40
V [libjvm.so+0x17788c0] external_word_Relocation::fix_relocation_after_move(CodeBuffer const*, CodeBuffer*)+0x8c
-------------
PR: https://git.openjdk.org/jdk/pull/9398
More information about the hotspot-dev
mailing list