Skip to content

Commit 916efec

Browse files
committed
s390 port: build fix
1 parent 10e3841 commit 916efec

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

src/hotspot/cpu/s390/frame_s390.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@
475475
public:
476476
// To be used, if sp was not extended to match callee's calling convention.
477477
inline frame(intptr_t* sp, address pc, intptr_t* unextended_sp = nullptr, intptr_t* fp = nullptr, CodeBlob* cb = nullptr);
478+
inline frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map = nullptr);
478479

479480
// Access frame via stack pointer.
480481
inline intptr_t* sp_addr_at(int index) const { return &sp()[index]; }

src/hotspot/cpu/s390/frame_s390.inline.hpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ inline frame::frame(intptr_t* sp, address pc, intptr_t* unextended_sp, intptr_t*
8787

8888
inline frame::frame(intptr_t* sp) : frame(sp, nullptr) {}
8989

90+
inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map)
91+
:_sp(sp), _pc(pc), _cb(cb), _oop_map(oop_map), _on_heap(false), DEBUG_ONLY(_frame_index(-1) COMMA) _unextended_sp(unextended_sp), _fp(fp) {
92+
setup();
93+
}
94+
9095
// Generic constructor. Used by pns() in debug.cpp only
9196
#ifndef PRODUCT
9297
inline frame::frame(void* sp, void* pc, void* unextended_sp)
@@ -371,4 +376,42 @@ void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr)
371376
Unimplemented();
372377
}
373378

379+
#if INCLUDE_JFR
380+
381+
// Static helper routines
382+
inline intptr_t* frame::sender_sp(intptr_t* fp) { return fp; }
383+
384+
// Extract common_abi parts.
385+
inline intptr_t* frame::fp(const intptr_t* sp) {
386+
assert(sp != nullptr, "invariant");
387+
return reinterpret_cast<intptr_t*>(((z_common_abi*)sp)->callers_sp);
388+
}
389+
390+
inline intptr_t* frame::link(const intptr_t* fp) { return frame::fp(fp); }
391+
392+
inline address frame::return_address(const intptr_t* sp) {
393+
assert(sp != nullptr, "invariant");
394+
return reinterpret_cast<address>(((z_common_abi*)sp)->return_pc);
395+
}
396+
397+
inline address frame::interpreter_return_address(const intptr_t* fp) { return frame::return_address(fp); }
398+
399+
inline address frame::interpreter_bcp(const intptr_t* fp) {
400+
assert(fp != nullptr, "invariant");
401+
return reinterpret_cast<address>(*(fp + _z_ijava_idx(bcp)));
402+
}
403+
404+
inline intptr_t* frame::interpreter_sender_sp(const intptr_t* fp) {
405+
assert(fp != nullptr, "invariant");
406+
return reinterpret_cast<intptr_t*>(*(fp + _z_ijava_idx(sender_sp)));
407+
}
408+
409+
inline bool frame::is_interpreter_frame_setup_at(const intptr_t* fp, const void* sp) {
410+
assert(fp != nullptr, "invariant");
411+
assert(sp != nullptr, "invariant");
412+
return sp <= fp - ((frame::z_ijava_state_size + frame::z_top_ijava_frame_abi_size) >> LogBytesPerWord);
413+
}
414+
415+
#endif // INCLUDE_JFR
416+
374417
#endif // CPU_S390_FRAME_S390_INLINE_HPP

0 commit comments

Comments
 (0)