320
321 void interpreter_frame_set_locals(intptr_t* locs);
322
323 // byte code index
324 jint interpreter_frame_bci() const;
325
326 // byte code pointer
327 address interpreter_frame_bcp() const;
328 void interpreter_frame_set_bcp(address bcp);
329
330 // method data pointer
331 address interpreter_frame_mdp() const;
332 void interpreter_frame_set_mdp(address dp);
333
334 // Find receiver out of caller's (compiled) argument list
335 oop retrieve_receiver(RegisterMap *reg_map);
336
337 // Return the monitor owner and BasicLock for compiled synchronized
338 // native methods. Used by JVMTI's GetLocalInstance method
339 // (via VM_GetReceiver) to retrieve the receiver from a native wrapper frame.
340 BasicLock* get_native_monitor();
341 oop get_native_receiver();
342
343 // Find receiver for an invoke when arguments are just pushed on stack (i.e., callee stack-frame is
344 // not setup)
345 oop interpreter_callee_receiver(Symbol* signature);
346
347
348 oop* interpreter_callee_receiver_addr(Symbol* signature);
349
350
351 // expression stack (may go up or down, direction == 1 or -1)
352 public:
353 intptr_t* interpreter_frame_expression_stack() const;
354
355 // The _at version returns a pointer because the address is used for GC.
356 intptr_t* interpreter_frame_expression_stack_at(jint offset) const;
357
358 // top of expression stack
359 intptr_t* interpreter_frame_tos_at(jint offset) const;
360 intptr_t* interpreter_frame_tos_address() const;
361
407
408 void interpreter_frame_set_mirror(oop mirror);
409
410 public:
411 // Entry frames
412 JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
413 JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
414 JavaCallWrapper** entry_frame_call_wrapper_addr() const;
415 intptr_t* entry_frame_argument_at(int offset) const;
416
417 // tells whether there is another chunk of Delta stack above
418 bool entry_frame_is_first() const;
419 bool upcall_stub_frame_is_first() const;
420
421 // Safepoints
422
423 public:
424 oop saved_oop_result(RegisterMap* map) const;
425 void set_saved_oop_result(RegisterMap* map, oop obj);
426
427 // For debugging
428 private:
429 const char* print_name() const;
430
431 void describe_pd(FrameValues& values, int frame_no);
432
433 public:
434 void print_value() const { print_value_on(tty,nullptr); }
435 void print_value_on(outputStream* st, JavaThread *thread) const;
436 void print_on(outputStream* st) const;
437 void interpreter_frame_print_on(outputStream* st) const;
438 void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
439 static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
440
441 // Add annotated descriptions of memory locations belonging to this frame to values
442 void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr);
443
444 // Conversion from a VMReg to physical stack location
445 template <typename RegisterMapT>
446 address oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const;
447 template <typename RegisterMapT>
448 oop* oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const;
449
450 // Oops-do's
451 void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) const;
452 void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true) const;
453
454 private:
455 void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f) const;
456
457 // Iteration of oops
458 void oops_do_internal(OopClosure* f, NMethodClosure* cf,
459 DerivedOopClosure* df, DerivedPointerIterationMode derived_mode,
460 const RegisterMap* map, bool use_interpreter_oop_map_cache) const;
461
462 void oops_entry_do(OopClosure* f, const RegisterMap* map) const;
|
320
321 void interpreter_frame_set_locals(intptr_t* locs);
322
323 // byte code index
324 jint interpreter_frame_bci() const;
325
326 // byte code pointer
327 address interpreter_frame_bcp() const;
328 void interpreter_frame_set_bcp(address bcp);
329
330 // method data pointer
331 address interpreter_frame_mdp() const;
332 void interpreter_frame_set_mdp(address dp);
333
334 // Find receiver out of caller's (compiled) argument list
335 oop retrieve_receiver(RegisterMap *reg_map);
336
337 // Return the monitor owner and BasicLock for compiled synchronized
338 // native methods. Used by JVMTI's GetLocalInstance method
339 // (via VM_GetReceiver) to retrieve the receiver from a native wrapper frame.
340 BasicLock* get_native_monitor() const;
341 oop get_native_receiver() const;
342
343 // Find receiver for an invoke when arguments are just pushed on stack (i.e., callee stack-frame is
344 // not setup)
345 oop interpreter_callee_receiver(Symbol* signature);
346
347
348 oop* interpreter_callee_receiver_addr(Symbol* signature);
349
350
351 // expression stack (may go up or down, direction == 1 or -1)
352 public:
353 intptr_t* interpreter_frame_expression_stack() const;
354
355 // The _at version returns a pointer because the address is used for GC.
356 intptr_t* interpreter_frame_expression_stack_at(jint offset) const;
357
358 // top of expression stack
359 intptr_t* interpreter_frame_tos_at(jint offset) const;
360 intptr_t* interpreter_frame_tos_address() const;
361
407
408 void interpreter_frame_set_mirror(oop mirror);
409
410 public:
411 // Entry frames
412 JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
413 JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
414 JavaCallWrapper** entry_frame_call_wrapper_addr() const;
415 intptr_t* entry_frame_argument_at(int offset) const;
416
417 // tells whether there is another chunk of Delta stack above
418 bool entry_frame_is_first() const;
419 bool upcall_stub_frame_is_first() const;
420
421 // Safepoints
422
423 public:
424 oop saved_oop_result(RegisterMap* map) const;
425 void set_saved_oop_result(RegisterMap* map, oop obj);
426
427 static JavaThread** saved_thread_address(const frame& f);
428
429 // For debugging
430 private:
431 const char* print_name() const;
432
433 void describe_pd(FrameValues& values, int frame_no);
434
435 public:
436 void print_value() const { print_value_on(tty,nullptr); }
437 void print_value_on(outputStream* st, JavaThread *thread) const;
438 void print_on(outputStream* st) const;
439 void interpreter_frame_print_on(outputStream* st) const;
440 void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
441 static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
442
443 // Add annotated descriptions of memory locations belonging to this frame to values
444 void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr, bool top = false);
445
446 // Conversion from a VMReg to physical stack location
447 template <typename RegisterMapT>
448 address oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const;
449 template <typename RegisterMapT>
450 oop* oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const;
451
452 // Oops-do's
453 void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) const;
454 void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true) const;
455
456 private:
457 void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f) const;
458
459 // Iteration of oops
460 void oops_do_internal(OopClosure* f, NMethodClosure* cf,
461 DerivedOopClosure* df, DerivedPointerIterationMode derived_mode,
462 const RegisterMap* map, bool use_interpreter_oop_map_cache) const;
463
464 void oops_entry_do(OopClosure* f, const RegisterMap* map) const;
|