RFR: 8337987: Relocate jfr and throw_exception stubs from StubGenerator to SharedRuntime [v4]
Yudi Zheng
yzheng at openjdk.org
Wed Aug 14 10:02:51 UTC 2024
On Wed, 14 Aug 2024 09:22:27 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Store the throw_exception and jfr stub code as blobs in class SharedRuntime, move the generation code to the the arch-specific generator classes and update client code to access them from their new location.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
>
> fix riscv port issues
src/hotspot/share/jvmci/vmStructs_jvmci.cpp line 330:
> 328: static_field(StubRoutines, _verify_oop_count, jint) \
> 329: \
> 330: static_field(StubRoutines, _throw_delayed_StackOverflowError_entry, address) \
Please add the following symbol exporting
diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp
index 8fdb96a3038..0e96cea6596 100644
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp
@@ -50,6 +50,7 @@ class CompilerToVM {
static address SharedRuntime_deopt_blob_unpack_with_exception_in_tls;
static address SharedRuntime_deopt_blob_uncommon_trap;
static address SharedRuntime_polling_page_return_handler;
+ static address SharedRuntime_throw_delayed_StackOverflowError_blob;
static address nmethod_entry_barrier;
static int thread_disarmed_guard_value_offset;
diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
index 2116133e56e..27031bf55fe 100644
--- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
@@ -68,6 +68,7 @@ address CompilerToVM::Data::SharedRuntime_deopt_blob_unpack;
address CompilerToVM::Data::SharedRuntime_deopt_blob_unpack_with_exception_in_tls;
address CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap;
address CompilerToVM::Data::SharedRuntime_polling_page_return_handler;
+address CompilerToVM::Data::SharedRuntime_throw_delayed_StackOverflowError_blob;
address CompilerToVM::Data::nmethod_entry_barrier;
int CompilerToVM::Data::thread_disarmed_guard_value_offset;
@@ -158,6 +159,7 @@ void CompilerToVM::Data::initialize(JVMCI_TRAPS) {
SharedRuntime_deopt_blob_unpack_with_exception_in_tls = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
SharedRuntime_deopt_blob_uncommon_trap = SharedRuntime::deopt_blob()->uncommon_trap();
SharedRuntime_polling_page_return_handler = SharedRuntime::polling_page_return_handler_blob()->entry_point();
+ SharedRuntime_throw_delayed_StackOverflowError_blob = SharedRuntime::throw_delayed_StackOverflowError_entry();
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
index 130f1032e65..e0c56ccabee 100644
--- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
+++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
@@ -68,6 +68,8 @@
static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_uncommon_trap, address) \
static_field(CompilerToVM::Data, SharedRuntime_polling_page_return_handler, \
address) \
+ static_field(CompilerToVM::Data, SharedRuntime_throw_delayed_StackOverflowError_blob, \
+ address) \
\
static_field(CompilerToVM::Data, nmethod_entry_barrier, address) \
static_field(CompilerToVM::Data, thread_disarmed_guard_value_offset, int) \
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20566#discussion_r1716650487
More information about the hotspot-runtime-dev
mailing list