Open sendaoYan opened 1 month ago
8172844: Assert fails in deoptimization due to original PC at the end of code section
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;
8151956: Support non-continuous CodeBlobs in HotSpot
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;
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
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