3535// Inline functions for ppc64 frames:
3636
3737// Initialize frame members (_sp must be given)
38- inline void frame::setup () {
38+ inline void frame::setup (kind knd ) {
3939 if (_pc == nullptr ) {
4040 _pc = (address)own_abi ()->lr ;
4141 assert (_pc != nullptr , " must have PC" );
4242 }
4343
4444 if (_cb == nullptr ) {
45- _cb = CodeCache::find_blob (_pc);
45+ _cb = (knd == kind::nmethod) ? CodeCache::find_blob_fast (_pc) : CodeCache::find_blob (_pc);
4646 }
4747
4848 if (_unextended_sp == nullptr ) {
@@ -89,21 +89,27 @@ inline void frame::setup() {
8989inline frame::frame () : _sp(nullptr ), _pc(nullptr ), _cb(nullptr ), _oop_map(nullptr ), _deopt_state(unknown),
9090 _on_heap(false ), DEBUG_ONLY(_frame_index(-1 ) COMMA) _unextended_sp(nullptr ), _fp(nullptr ) {}
9191
92- inline frame::frame (intptr_t * sp) : frame(sp, nullptr ) {}
92+ inline frame::frame (intptr_t * sp) : frame(sp, nullptr , kind::nmethod ) {}
9393
9494inline frame::frame (intptr_t * sp, intptr_t * fp, address pc) : frame(sp, pc, nullptr , fp, nullptr ) {}
9595
96+ inline frame::frame (intptr_t * sp, address pc, kind knd)
97+ : _sp(sp), _pc(pc), _cb(nullptr ), _oop_map(nullptr ),
98+ _on_heap(false ), DEBUG_ONLY(_frame_index(-1 ) COMMA) _unextended_sp(sp), _fp(nullptr ) {
99+ setup (knd);
100+ }
101+
96102inline frame::frame (intptr_t * sp, address pc, intptr_t * unextended_sp, intptr_t * fp, CodeBlob* cb)
97103 : _sp(sp), _pc(pc), _cb(cb), _oop_map(nullptr ),
98104 _on_heap(false ), DEBUG_ONLY(_frame_index(-1 ) COMMA) _unextended_sp(unextended_sp), _fp(fp) {
99- setup ();
105+ setup (kind::nmethod );
100106}
101107
102108inline frame::frame (intptr_t * sp, intptr_t * unextended_sp, intptr_t * fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map)
103109 : _sp(sp), _pc(pc), _cb(cb), _oop_map(oop_map),
104110 _on_heap(false ), DEBUG_ONLY(_frame_index(-1 ) COMMA) _unextended_sp(unextended_sp), _fp(fp) {
105111 assert (_cb != nullptr , " pc: " INTPTR_FORMAT, p2i (pc));
106- setup ();
112+ setup (kind::nmethod );
107113}
108114
109115inline frame::frame (intptr_t * sp, intptr_t * unextended_sp, intptr_t * fp, address pc, CodeBlob* cb,
@@ -113,7 +119,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
113119 // In thaw, non-heap frames use this constructor to pass oop_map. I don't know why.
114120 assert (_on_heap || _cb != nullptr , " these frames are always heap frames" );
115121 if (cb != nullptr ) {
116- setup ();
122+ setup (kind::nmethod );
117123 }
118124#ifdef ASSERT
119125 // The following assertion has been disabled because it would sometime trap for Continuation.run,
@@ -300,7 +306,7 @@ inline frame frame::sender_raw(RegisterMap* map) const {
300306
301307 // Must be native-compiled frame, i.e. the marshaling code for native
302308 // methods that exists in the core system.
303- return frame (sender_sp (), sender_pc ());
309+ return frame (sender_sp (), sender_pc (), kind::code_blob );
304310}
305311
306312inline frame frame::sender (RegisterMap* map) const {
0 commit comments