< prev index next >

src/hotspot/cpu/s390/frame_s390.cpp

Print this page

213   // Last_java_pc is not set if we come here from compiled code.
214   frame fr(jfa->last_Java_sp());
215   return fr;
216 }
217 
218 OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
219   ShouldNotCallThis();
220   return nullptr;
221 }
222 
223 bool frame::optimized_entry_frame_is_first() const {
224   ShouldNotCallThis();
225   return false;
226 }
227 
228 frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
229   // Pass callers sender_sp as unextended_sp.
230   return frame(sender_sp(), sender_pc(), (intptr_t*)(ijava_state()->sender_sp));
231 }
232 

233 frame frame::sender_for_compiled_frame(RegisterMap *map) const {
234   assert(map != NULL, "map must be set");
235   // Frame owned by compiler.
236 
237   address pc = *compiled_sender_pc_addr(_cb);
238   frame caller(compiled_sender_sp(_cb), pc);
239 
240   // Now adjust the map.
241 
242   // Get the rest.
243   if (map->update_map()) {
244     // Tell GC to use argument oopmaps for some runtime stubs that need it.
245     map->set_include_argument_oops(_cb->caller_must_gc_arguments(map->thread()));
246     if (_cb->oop_maps() != NULL) {
247       OopMapSet::update_register_map(this, map);
248     }
249   }
250 
251   return caller;
252 }

255   return sender_sp();
256 }
257 
258 address* frame::compiled_sender_pc_addr(CodeBlob* cb) const {
259   return sender_pc_addr();
260 }
261 
262 frame frame::sender(RegisterMap* map) const {
263   // Default is we don't have to follow them. The sender_for_xxx will
264   // update it accordingly.
265   map->set_include_argument_oops(false);
266 
267   if (is_entry_frame()) {
268     return sender_for_entry_frame(map);
269   }
270   if (is_interpreted_frame()) {
271     return sender_for_interpreter_frame(map);
272   }
273   assert(_cb == CodeCache::find_blob(pc()),"Must be the same");
274   if (_cb != NULL) {
275     return sender_for_compiled_frame(map);
276   }
277   // Must be native-compiled frame, i.e. the marshaling code for native
278   // methods that exists in the core system.
279   return frame(sender_sp(), sender_pc());
280 }
281 
282 void frame::patch_pc(Thread* thread, address pc) {
283   assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
284   if (TracePcPatching) {
285     tty->print_cr("patch_pc at address  " PTR_FORMAT " [" PTR_FORMAT " -> " PTR_FORMAT "] ",
286                   p2i(&((address*) _sp)[-1]), p2i(((address*) _sp)[-1]), p2i(pc));
287   }
288   own_abi()->return_pc = (uint64_t)pc;
289   address original_pc = CompiledMethod::get_deopt_original_pc(this);
290   if (original_pc != NULL) {
291     assert(original_pc == _pc, "expected original to be stored before patching");
292     _deopt_state = is_deoptimized;
293     // Leave _pc as is.
294   } else {
295     _deopt_state = not_deoptimized;

611   values.describe(frame_no, (intptr_t*)&ijava_state()->name, #name);
612 
613 void frame::describe_pd(FrameValues& values, int frame_no) {
614   if (is_interpreted_frame()) {
615     // Describe z_ijava_state elements.
616     DESCRIBE_ADDRESS(method);
617     DESCRIBE_ADDRESS(locals);
618     DESCRIBE_ADDRESS(monitors);
619     DESCRIBE_ADDRESS(cpoolCache);
620     DESCRIBE_ADDRESS(bcp);
621     DESCRIBE_ADDRESS(mdx);
622     DESCRIBE_ADDRESS(esp);
623     DESCRIBE_ADDRESS(sender_sp);
624     DESCRIBE_ADDRESS(top_frame_sp);
625     DESCRIBE_ADDRESS(oop_tmp);
626     DESCRIBE_ADDRESS(lresult);
627     DESCRIBE_ADDRESS(fresult);
628   }
629 }
630 



631 #endif // !PRODUCT
632 
633 intptr_t *frame::initial_deoptimization_info() {
634   // Used to reset the saved FP.
635   return fp();
636 }



















213   // Last_java_pc is not set if we come here from compiled code.
214   frame fr(jfa->last_Java_sp());
215   return fr;
216 }
217 
218 OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
219   ShouldNotCallThis();
220   return nullptr;
221 }
222 
223 bool frame::optimized_entry_frame_is_first() const {
224   ShouldNotCallThis();
225   return false;
226 }
227 
228 frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
229   // Pass callers sender_sp as unextended_sp.
230   return frame(sender_sp(), sender_pc(), (intptr_t*)(ijava_state()->sender_sp));
231 }
232 
233 template <bool stub>
234 frame frame::sender_for_compiled_frame(RegisterMap *map) const {
235   assert(map != NULL, "map must be set");
236   // Frame owned by compiler.
237 
238   address pc = *compiled_sender_pc_addr(_cb);
239   frame caller(compiled_sender_sp(_cb), pc);
240 
241   // Now adjust the map.
242 
243   // Get the rest.
244   if (map->update_map()) {
245     // Tell GC to use argument oopmaps for some runtime stubs that need it.
246     map->set_include_argument_oops(_cb->caller_must_gc_arguments(map->thread()));
247     if (_cb->oop_maps() != NULL) {
248       OopMapSet::update_register_map(this, map);
249     }
250   }
251 
252   return caller;
253 }

256   return sender_sp();
257 }
258 
259 address* frame::compiled_sender_pc_addr(CodeBlob* cb) const {
260   return sender_pc_addr();
261 }
262 
263 frame frame::sender(RegisterMap* map) const {
264   // Default is we don't have to follow them. The sender_for_xxx will
265   // update it accordingly.
266   map->set_include_argument_oops(false);
267 
268   if (is_entry_frame()) {
269     return sender_for_entry_frame(map);
270   }
271   if (is_interpreted_frame()) {
272     return sender_for_interpreter_frame(map);
273   }
274   assert(_cb == CodeCache::find_blob(pc()),"Must be the same");
275   if (_cb != NULL) {
276     return sender_for_compiled_frame<false>(map);
277   }
278   // Must be native-compiled frame, i.e. the marshaling code for native
279   // methods that exists in the core system.
280   return frame(sender_sp(), sender_pc());
281 }
282 
283 void frame::patch_pc(Thread* thread, address pc) {
284   assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
285   if (TracePcPatching) {
286     tty->print_cr("patch_pc at address  " PTR_FORMAT " [" PTR_FORMAT " -> " PTR_FORMAT "] ",
287                   p2i(&((address*) _sp)[-1]), p2i(((address*) _sp)[-1]), p2i(pc));
288   }
289   own_abi()->return_pc = (uint64_t)pc;
290   address original_pc = CompiledMethod::get_deopt_original_pc(this);
291   if (original_pc != NULL) {
292     assert(original_pc == _pc, "expected original to be stored before patching");
293     _deopt_state = is_deoptimized;
294     // Leave _pc as is.
295   } else {
296     _deopt_state = not_deoptimized;

612   values.describe(frame_no, (intptr_t*)&ijava_state()->name, #name);
613 
614 void frame::describe_pd(FrameValues& values, int frame_no) {
615   if (is_interpreted_frame()) {
616     // Describe z_ijava_state elements.
617     DESCRIBE_ADDRESS(method);
618     DESCRIBE_ADDRESS(locals);
619     DESCRIBE_ADDRESS(monitors);
620     DESCRIBE_ADDRESS(cpoolCache);
621     DESCRIBE_ADDRESS(bcp);
622     DESCRIBE_ADDRESS(mdx);
623     DESCRIBE_ADDRESS(esp);
624     DESCRIBE_ADDRESS(sender_sp);
625     DESCRIBE_ADDRESS(top_frame_sp);
626     DESCRIBE_ADDRESS(oop_tmp);
627     DESCRIBE_ADDRESS(lresult);
628     DESCRIBE_ADDRESS(fresult);
629   }
630 }
631 
632 void frame::describe_top_pd(FrameValues& values) {
633   Unimplemented();
634 }
635 #endif // !PRODUCT
636 
637 intptr_t *frame::initial_deoptimization_info() {
638   // Used to reset the saved FP.
639   return fp();
640 }
641 
642 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
643 template BasicObjectLock* frame::interpreter_frame_monitor_end<true>() const;
644 template BasicObjectLock* frame::interpreter_frame_monitor_end<false>() const;
645 
646 template <bool relative>
647 inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
648   return interpreter_frame_monitors();
649 }
650 
651 template intptr_t* frame::interpreter_frame_tos_at<false>(jint offset) const;
652 template intptr_t* frame::interpreter_frame_tos_at<true >(jint offset) const;
653 
654 template <bool relative>
655 inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
656   return &interpreter_frame_tos_address()[offset];
657 }
658 
< prev index next >