164 165 // for Profiling - acting on another frame. walks sender frames 166 // if valid. 167 frame profile_find_Java_sender_frame(JavaThread *thread); 168 bool safe_for_sender(JavaThread *thread); 169 170 // returns the sender, but skips conversion frames 171 frame real_sender(RegisterMap* map) const; 172 173 // returns the the sending Java frame, skipping any intermediate C frames 174 // NB: receiver must not be first frame 175 frame java_sender() const; 176 177 private: 178 // Helper methods for better factored code in frame::sender 179 frame sender_for_compiled_frame(RegisterMap* map) const; 180 frame sender_for_entry_frame(RegisterMap* map) const; 181 frame sender_for_interpreter_frame(RegisterMap* map) const; 182 frame sender_for_native_frame(RegisterMap* map) const; 183 184 // All frames: 185 186 // A low-level interface for vframes: 187 188 public: 189 190 intptr_t* addr_at(int index) const { return &fp()[index]; } 191 intptr_t at(int index) const { return *addr_at(index); } 192 193 // accessors for locals 194 oop obj_at(int offset) const { return *obj_at_addr(offset); } 195 void obj_at_put(int offset, oop value) { *obj_at_addr(offset) = value; } 196 197 jint int_at(int offset) const { return *int_at_addr(offset); } 198 void int_at_put(int offset, jint value) { *int_at_addr(offset) = value; } 199 200 oop* obj_at_addr(int offset) const { return (oop*) addr_at(offset); } 201 202 oop* adjusted_obj_at_addr(Method* method, int index) { return obj_at_addr(adjust_offset(method, index)); } 203 | 164 165 // for Profiling - acting on another frame. walks sender frames 166 // if valid. 167 frame profile_find_Java_sender_frame(JavaThread *thread); 168 bool safe_for_sender(JavaThread *thread); 169 170 // returns the sender, but skips conversion frames 171 frame real_sender(RegisterMap* map) const; 172 173 // returns the the sending Java frame, skipping any intermediate C frames 174 // NB: receiver must not be first frame 175 frame java_sender() const; 176 177 private: 178 // Helper methods for better factored code in frame::sender 179 frame sender_for_compiled_frame(RegisterMap* map) const; 180 frame sender_for_entry_frame(RegisterMap* map) const; 181 frame sender_for_interpreter_frame(RegisterMap* map) const; 182 frame sender_for_native_frame(RegisterMap* map) const; 183 184 bool is_entry_frame_valid(JavaThread* thread) const; 185 186 // All frames: 187 188 // A low-level interface for vframes: 189 190 public: 191 192 intptr_t* addr_at(int index) const { return &fp()[index]; } 193 intptr_t at(int index) const { return *addr_at(index); } 194 195 // accessors for locals 196 oop obj_at(int offset) const { return *obj_at_addr(offset); } 197 void obj_at_put(int offset, oop value) { *obj_at_addr(offset) = value; } 198 199 jint int_at(int offset) const { return *int_at_addr(offset); } 200 void int_at_put(int offset, jint value) { *int_at_addr(offset) = value; } 201 202 oop* obj_at_addr(int offset) const { return (oop*) addr_at(offset); } 203 204 oop* adjusted_obj_at_addr(Method* method, int index) { return obj_at_addr(adjust_offset(method, index)); } 205 |