RFR: 8337987: Relocate jfr and throw_exception stubs from StubGenerator to SharedRuntime [v3]
Fei Yang
fyang at openjdk.org
Wed Aug 14 07:00:50 UTC 2024
On Tue, 13 Aug 2024 21:38:09 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 accidental paste
Hi Andrew, I find that we need following add-on change for riscv:
diff --git a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
index dc89e489b24..bed24e442e8 100644
--- a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
+++ b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
@@ -66,6 +66,12 @@
#define __ masm->
+#ifdef PRODUCT
+#define BLOCK_COMMENT(str) /* nothing */
+#else
+#define BLOCK_COMMENT(str) __ block_comment(str)
+#endif
+
const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size;
class RegisterSaver {
@@ -2742,7 +2748,7 @@ static void jfr_epilogue(MacroAssembler* masm) {
// For c2: c_rarg0 is junk, call to runtime to write a checkpoint.
// It returns a jobject handle to the event writer.
// The handle is dereferenced and the return value is the event writer oop.
-static RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
+RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
enum layout {
fp_off,
fp_off2,
@@ -2780,7 +2786,7 @@ static RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
}
// For c2: call to return a leased buffer.
-static RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
+RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
enum layout {
fp_off,
fp_off2,
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20566#issuecomment-2287993001
More information about the graal-dev
mailing list