58 #endif
59
60 public:
61 StackChunkFrameStream() { NOT_PRODUCT(_chunk = nullptr; _index = -1;) DEBUG_ONLY(_has_stub = false;) }
62 inline StackChunkFrameStream(stackChunkOop chunk);
63 inline StackChunkFrameStream(stackChunkOop chunk, const frame& f);
64
65 bool is_done() const { return _sp >= _end; }
66
67 // Query
68 intptr_t* sp() const { return _sp; }
69 inline address pc() const { return get_pc(); }
70 inline intptr_t* fp() const;
71 inline intptr_t* unextended_sp() const { return frame_kind == ChunkFrames::Mixed ? _unextended_sp : _sp; }
72 inline address orig_pc() const;
73
74 inline bool is_interpreted() const;
75 inline bool is_stub() const;
76 inline bool is_compiled() const;
77 CodeBlob* cb() const { return _cb; }
78 const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
79 inline int frame_size() const;
80 inline int stack_argsize() const;
81 inline int num_oops() const;
82
83 inline void initialize_register_map(RegisterMap* map);
84 template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
85
86 template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
87
88 void handle_deopted() const;
89
90 inline frame to_frame() const;
91
92 #ifdef ASSERT
93 bool is_in_frame(void* p) const;
94 template <typename RegisterMapT> bool is_in_oops(void* p, const RegisterMapT* map) const;
95 #endif
96
97 void print_on(outputStream* st) const PRODUCT_RETURN;
98
99 private:
100 inline address get_pc() const;
101 inline void get_cb();
102
103 inline int interpreter_frame_size() const;
104 inline int interpreter_frame_num_oops() const;
105 inline int interpreter_frame_stack_argsize() const;
106 inline void next_for_interpreter_frame();
107 inline intptr_t* unextended_sp_for_interpreter_frame() const;
108 inline intptr_t* derelativize(int offset) const;
109 inline void get_oopmap() const;
110 inline void get_oopmap(address pc, int oopmap_slot) const;
111
112 template <typename RegisterMapT> inline void update_reg_map_pd(RegisterMapT* map);
113
114 template <typename RegisterMapT>
115 inline void* reg_to_loc(VMReg reg, const RegisterMapT* map) const;
116
117 void assert_is_interpreted_and_frame_type_mixed() const NOT_DEBUG_RETURN;
118
119 public:
120 template <class OopClosureType, class RegisterMapT>
121 inline void iterate_oops(OopClosureType* closure, const RegisterMapT* map) const;
|
58 #endif
59
60 public:
61 StackChunkFrameStream() { NOT_PRODUCT(_chunk = nullptr; _index = -1;) DEBUG_ONLY(_has_stub = false;) }
62 inline StackChunkFrameStream(stackChunkOop chunk);
63 inline StackChunkFrameStream(stackChunkOop chunk, const frame& f);
64
65 bool is_done() const { return _sp >= _end; }
66
67 // Query
68 intptr_t* sp() const { return _sp; }
69 inline address pc() const { return get_pc(); }
70 inline intptr_t* fp() const;
71 inline intptr_t* unextended_sp() const { return frame_kind == ChunkFrames::Mixed ? _unextended_sp : _sp; }
72 inline address orig_pc() const;
73
74 inline bool is_interpreted() const;
75 inline bool is_stub() const;
76 inline bool is_compiled() const;
77 CodeBlob* cb() const { return _cb; }
78 inline void get_cb();
79 const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
80 inline int frame_size() const;
81 inline int stack_argsize() const;
82 inline int num_oops() const;
83
84 inline void initialize_register_map(RegisterMap* map);
85 template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
86
87 template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
88
89 void handle_deopted() const;
90
91 inline frame to_frame() const;
92
93 #ifdef ASSERT
94 bool is_in_frame(void* p) const;
95 template <typename RegisterMapT> bool is_in_oops(void* p, const RegisterMapT* map) const;
96 #endif
97
98 void print_on(outputStream* st) const PRODUCT_RETURN;
99
100 private:
101 inline address get_pc() const;
102
103 inline int interpreter_frame_size() const;
104 inline int interpreter_frame_num_oops() const;
105 inline int interpreter_frame_stack_argsize() const;
106 inline void next_for_interpreter_frame();
107 inline intptr_t* unextended_sp_for_interpreter_frame() const;
108 inline intptr_t* derelativize(int offset) const;
109 inline void get_oopmap() const;
110 inline void get_oopmap(address pc, int oopmap_slot) const;
111
112 template <typename RegisterMapT> inline void update_reg_map_pd(RegisterMapT* map);
113
114 template <typename RegisterMapT>
115 inline void* reg_to_loc(VMReg reg, const RegisterMapT* map) const;
116
117 void assert_is_interpreted_and_frame_type_mixed() const NOT_DEBUG_RETURN;
118
119 public:
120 template <class OopClosureType, class RegisterMapT>
121 inline void iterate_oops(OopClosureType* closure, const RegisterMapT* map) const;
|