8289925: Shared code shouldn't reference the platform specific method frame::interpreter_frame_last_sp()

Reviewed-by: eosterlund, dlong
This commit is contained in:
Richard Reingruber 2022-10-05 14:10:02 +00:00
parent bd90c4cfa6
commit ee6c39175b
7 changed files with 9 additions and 26 deletions

View File

@ -395,8 +395,6 @@
inline void interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp);
inline void interpreter_frame_set_sender_sp(intptr_t* sender_sp);
inline intptr_t* interpreter_frame_last_sp() const;
template <typename RegisterMapT>
static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);

View File

@ -257,11 +257,6 @@ inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
Unimplemented();
}
inline intptr_t* frame::interpreter_frame_last_sp() const {
Unimplemented();
return NULL;
}
inline int frame::sender_sp_ret_address_offset() {
Unimplemented();
return 0;

View File

@ -480,8 +480,6 @@
address* sender_pc_addr(void) const;
public:
inline intptr_t* interpreter_frame_last_sp() const;
template <typename RegisterMapT>
static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);

View File

@ -326,11 +326,6 @@ inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
Unimplemented();
}
inline intptr_t* frame::interpreter_frame_last_sp() const {
Unimplemented();
return NULL;
}
inline int frame::sender_sp_ret_address_offset() {
Unimplemented();
return 0;

View File

@ -81,8 +81,6 @@
inline address* sender_pc_addr() const;
inline intptr_t* interpreter_frame_last_sp() const;
template <typename RegisterMapT>
static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);

View File

@ -190,11 +190,6 @@ inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
Unimplemented();
}
inline intptr_t* frame::interpreter_frame_last_sp() const {
Unimplemented();
return NULL;
}
inline int frame::sender_sp_ret_address_offset() {
Unimplemented();
return 0;

View File

@ -135,12 +135,17 @@ bool Continuation::is_continuation_entry_frame(const frame& f, const RegisterMap
return m != nullptr && m->intrinsic_id() == vmIntrinsics::_Continuation_enter;
}
// The parameter `sp` should be the actual sp and not the unextended sp because at
// least on PPC64 unextended_sp < sp is possible as interpreted frames are trimmed
// to the actual size of the expression stack before calls. The problem there is
// that even unextended_sp < entry_sp < sp is possible for an interpreted frame.
static inline bool is_sp_in_continuation(const ContinuationEntry* entry, intptr_t* const sp) {
// entry_sp() returns the unextended_sp which is always greater or equal to the actual sp
return entry->entry_sp() > sp;
}
bool Continuation::is_frame_in_continuation(const ContinuationEntry* entry, const frame& f) {
return is_sp_in_continuation(entry, f.unextended_sp());
return is_sp_in_continuation(entry, f.sp());
}
ContinuationEntry* Continuation::get_continuation_entry_for_sp(JavaThread* thread, intptr_t* const sp) {
@ -160,7 +165,7 @@ ContinuationEntry* Continuation::get_continuation_entry_for_entry_frame(JavaThre
}
bool Continuation::is_frame_in_continuation(JavaThread* thread, const frame& f) {
return f.is_heap_frame() || (get_continuation_entry_for_sp(thread, f.unextended_sp()) != nullptr);
return f.is_heap_frame() || (get_continuation_entry_for_sp(thread, f.sp()) != nullptr);
}
static frame continuation_top_frame(const ContinuationWrapper& cont, RegisterMap* map) {
@ -296,9 +301,8 @@ bool Continuation::unpin(JavaThread* current) {
frame Continuation::continuation_bottom_sender(JavaThread* thread, const frame& callee, intptr_t* sender_sp) {
assert (thread != nullptr, "");
ContinuationEntry* ce = get_continuation_entry_for_sp(thread,
callee.is_interpreted_frame() ? callee.interpreter_frame_last_sp() : callee.unextended_sp());
assert(ce != nullptr, "callee.unextended_sp(): " INTPTR_FORMAT, p2i(callee.unextended_sp()));
ContinuationEntry* ce = get_continuation_entry_for_sp(thread, callee.sp());
assert(ce != nullptr, "callee.sp(): " INTPTR_FORMAT, p2i(callee.sp()));
log_develop_debug(continuations)("continuation_bottom_sender: [" JLONG_FORMAT "] [%d] callee: " INTPTR_FORMAT
" sender_sp: " INTPTR_FORMAT,