diff --git a/src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp b/src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp index 1521e0e92bffd..65b9e81ce1d69 100644 --- a/src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp +++ b/src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp @@ -129,10 +129,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { } } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame"); - intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset); - *lspp = f.unextended_sp() - f.fp(); + f.interpreter_frame_set_last_sp(f.unextended_sp()); } inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) { diff --git a/src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp b/src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp index 64c55915163e4..49eb59531fb6f 100644 --- a/src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp +++ b/src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { Unimplemented(); } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { Unimplemented(); } diff --git a/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp b/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp index 951f36f46a426..3cb5f8644e57f 100644 --- a/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp +++ b/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp @@ -71,7 +71,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { // nothing to do } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { // nothing to do DEBUG_ONLY( intptr_t* lspp = (intptr_t*) &(f.get_ijava_state()->top_frame_sp); ) assert(*lspp == f.unextended_sp() - f.fp(), "should be " INTPTR_FORMAT " usp:" INTPTR_FORMAT " fp:" INTPTR_FORMAT, *lspp, p2i(f.unextended_sp()), p2i(f.fp())); diff --git a/src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp b/src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp index 142c37dc9f974..7e93b7cbb960f 100644 --- a/src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp +++ b/src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp @@ -127,10 +127,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { } } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame"); - intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset); - *lspp = f.unextended_sp() - f.fp(); + f.interpreter_frame_set_last_sp(f.unextended_sp()); } inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) { diff --git a/src/hotspot/cpu/s390/continuationFreezeThaw_s390.inline.hpp b/src/hotspot/cpu/s390/continuationFreezeThaw_s390.inline.hpp index 7fa300be7d651..b167fefa92719 100644 --- a/src/hotspot/cpu/s390/continuationFreezeThaw_s390.inline.hpp +++ b/src/hotspot/cpu/s390/continuationFreezeThaw_s390.inline.hpp @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { Unimplemented(); } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { Unimplemented(); } diff --git a/src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp b/src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp index 7027b958673cc..193997a72117e 100644 --- a/src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp +++ b/src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp @@ -126,10 +126,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { } } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame"); - intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset); - *lspp = f.unextended_sp() - f.fp(); + f.interpreter_frame_set_last_sp(f.unextended_sp()); } inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) { diff --git a/src/hotspot/cpu/zero/continuationFreezeThaw_zero.inline.hpp b/src/hotspot/cpu/zero/continuationFreezeThaw_zero.inline.hpp index 9bc947a828f42..a1e9104c0071b 100644 --- a/src/hotspot/cpu/zero/continuationFreezeThaw_zero.inline.hpp +++ b/src/hotspot/cpu/zero/continuationFreezeThaw_zero.inline.hpp @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) { Unimplemented(); } -inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) { +inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) { Unimplemented(); } diff --git a/src/hotspot/share/runtime/continuationFreezeThaw.cpp b/src/hotspot/share/runtime/continuationFreezeThaw.cpp index 755892df17d31..a03a6e3c25e17 100644 --- a/src/hotspot/share/runtime/continuationFreezeThaw.cpp +++ b/src/hotspot/share/runtime/continuationFreezeThaw.cpp @@ -455,7 +455,7 @@ class FreezeBase : public StackObj { inline void set_top_frame_metadata_pd(const frame& hf); inline void patch_pd(frame& callee, const frame& caller); void adjust_interpreted_frame_unextended_sp(frame& f); - static inline void prepare_freeze_interpreted_top_frame(const frame& f); + static inline void prepare_freeze_interpreted_top_frame(frame& f); static inline void relativize_interpreted_frame_metadata(const frame& f, const frame& hf); protected: