@@ -87,6 +87,11 @@ inline frame::frame(intptr_t* sp, address pc, intptr_t* unextended_sp, intptr_t*
8787
8888inline 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
9297inline 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