sendaoYan / riscv-port-jdk8u-ysd

https://openjdk.org/projects/riscv-port
GNU General Public License v2.0
0 stars 0 forks source link

[riscv64-8u][fastdebug]frame_riscv.inline.hpp:85:17: error: ‘class CodeBlob’ has no member named ‘as_compiled_method’ #51

Open sendaoYan opened 1 month ago

sendaoYan commented 1 month ago
+ cd build/linux-riscv64-normal-server-release/hotspot/linux_riscv_compiler2/generated
+ eval /usr/bin/g++ -DLINUX -D_GNU_SOURCE -DRISCV64 -DASSERT -DCHECK_UNHANDLED_OOPS -I. -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/prims -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/posix/vm -I../generated '-DHOTSPOT_RELEASE_VERSION="25.412-b00"' '-DHOTSPOT_BUILD_TARGET="fastdebug"' '-DHOTSPOT_BUILD_USER="yansendao"' '-DHOTSPOT_LIB_ARCH="riscv64"' '-DHOTSPOT_VM_DISTRO="OpenJDK"' -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_riscv -DTARGET_ARCH_MODEL_riscv -DTARGET_OS_ARCH_linux_riscv -DTARGET_OS_ARCH_MODEL_linux_riscv64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -pipe -fno-strict-aliasing -fno-omit-frame-pointer -O3 -g -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -fstack-protector -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch
++ /usr/bin/g++ -DLINUX -D_GNU_SOURCE -DRISCV64 -DASSERT -DCHECK_UNHANDLED_OOPS -I. -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/prims -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION=25.412-b00 -DHOTSPOT_BUILD_TARGET=fastdebug -DHOTSPOT_BUILD_USER=yansendao -DHOTSPOT_LIB_ARCH=riscv64 -DHOTSPOT_VM_DISTRO=OpenJDK -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_riscv -DTARGET_ARCH_MODEL_riscv -DTARGET_OS_ARCH_linux_riscv -DTARGET_OS_ARCH_MODEL_linux_riscv64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -pipe -fno-strict-aliasing -fno-omit-frame-pointer -O3 -g -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -fstack-protector -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/globals.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/allocation.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/iterator.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/klass.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/handles.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/asm/assembler.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp: In constructor ‘frame::frame(intptr_t*, intptr_t*, intptr_t*, address)’:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp:85:17: error: ‘class CodeBlob’ has no member named ‘as_compiled_method’
   85 |     assert(_cb->as_compiled_method()->insts_contains_inclusive(_pc),
      |                 ^~~~~~~~~~~~~~~~~~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/utilities/debug.hpp:117:9: note: in definition of macro ‘assert’
  117 |   if (!(p)) {                                                                \
      |         ^

make-aarch64-fastdebug.log make-aarch64-release.log make-aarch64-slowdebug.log make-riscv64-fastdebug.log make-riscv64-release.log make-riscv64-slowdebug.log make-x86_64-fastdebug.log make-x86_64-release.log make-x86_64-slowdebug.log standalone.log

sendaoYan commented 1 month ago

8172844: Assert fails in deoptimization due to original PC at the end of code section

sendaoYan commented 1 month ago

JDK-8172844.patch

sendaoYan commented 1 month ago

51.patch

diff --git a/hotspot/src/cpu/riscv/vm/frame_riscv.cpp b/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
index d390e5feeb1..ebe98747f5c 100644
--- a/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
+++ b/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
@@ -378,8 +378,7 @@ void frame::verify_deopt_original_pc(nmethod* nm, intptr_t* unextended_sp) {

   assert_cond(nm != NULL);
   address original_pc = nm->get_original_pc(&fr);
-  assert(nm->insts_contains_inclusive(original_pc),
-         "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
+  assert(nm->insts_contains(original_pc), "original PC must be in nmethod");
 }
 #endif

diff --git a/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp b/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
index cc130804e1d..562b0654c29 100644
--- a/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
+++ b/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
@@ -82,8 +82,7 @@ inline frame::frame(intptr_t* ptr_sp, intptr_t* unextended_sp, intptr_t* ptr_fp,
   address original_pc = nmethod::get_deopt_original_pc(this);
   if (original_pc != NULL) {
     _pc = original_pc;
-    assert(_cb->as_compiled_method()->insts_contains_inclusive(_pc),
-           "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
+    assert(((CompiledMethod*)_cb)->insts_contains(_pc), "original PC must be in CompiledMethod");
     _deopt_state = is_deoptimized;
   } else {
     _deopt_state = not_deoptimized;
sendaoYan commented 1 month ago

8151956: Support non-continuous CodeBlobs in HotSpot

sendaoYan commented 1 month ago

51.patch JDK-8151956.patch JDK-8172844.patch

diff --git a/hotspot/src/cpu/riscv/vm/frame_riscv.cpp b/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
index d390e5feeb1..ebe98747f5c 100644
--- a/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
+++ b/hotspot/src/cpu/riscv/vm/frame_riscv.cpp
@@ -378,8 +378,7 @@ void frame::verify_deopt_original_pc(nmethod* nm, intptr_t* unextended_sp) {

   assert_cond(nm != NULL);
   address original_pc = nm->get_original_pc(&fr);
-  assert(nm->insts_contains_inclusive(original_pc),
-         "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
+  assert(nm->insts_contains(original_pc), "original PC must be in nmethod");
 }
 #endif

diff --git a/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp b/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
index cc130804e1d..681e6185aa6 100644
--- a/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
+++ b/hotspot/src/cpu/riscv/vm/frame_riscv.inline.hpp
@@ -82,8 +82,7 @@ inline frame::frame(intptr_t* ptr_sp, intptr_t* unextended_sp, intptr_t* ptr_fp,
   address original_pc = nmethod::get_deopt_original_pc(this);
   if (original_pc != NULL) {
     _pc = original_pc;
-    assert(_cb->as_compiled_method()->insts_contains_inclusive(_pc),
-           "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
+    assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
     _deopt_state = is_deoptimized;
   } else {
     _deopt_state = not_deoptimized;
sendaoYan commented 1 month ago

make-aarch64-slowdebug.log To github.com:sendaoYan/riscv-port-jdk8u-ysd.git efc9dac44e6..2c2877a6943 minus-jbs8276799 -> minus-jbs8276799 make-aarch64-fastdebug.log make-aarch64-release.log make-riscv64-fastdebug.log make-riscv64-release.log make-riscv64-slowdebug.log make-x86_64-fastdebug.log make-x86_64-release.log make-x86_64-slowdebug.log standalone.log