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
409
410 void interpreter_frame_set_mirror(oop mirror);
411
412 public:
413 // Entry frames
414 JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
415 JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
416 JavaCallWrapper** entry_frame_call_wrapper_addr() const;
417 intptr_t* entry_frame_argument_at(int offset) const;
418
419 // tells whether there is another chunk of Delta stack above
420 bool entry_frame_is_first() const;
421 bool upcall_stub_frame_is_first() const;
422
423 // Safepoints
424
425 public:
426 oop saved_oop_result(RegisterMap* map) const;
427 void set_saved_oop_result(RegisterMap* map, oop obj);
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); }
437 void print_value_on(outputStream* st) 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 #ifndef PRODUCT
444 // Add annotated descriptions of memory locations belonging to this frame to values
445 void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr);
446 #endif
447
448 // Conversion from a VMReg to physical stack location
449 template <typename RegisterMapT>
450 address oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const;
451 template <typename RegisterMapT>
452 oop* oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const;
453
454 // Oops-do's
455 void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) const;
456 void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true) const;
457
458 private:
459 void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f) const;
460
461 // Iteration of oops
462 void oops_do_internal(OopClosure* f, NMethodClosure* cf,
463 DerivedOopClosure* df, DerivedPointerIterationMode derived_mode,
464 const RegisterMap* map, bool use_interpreter_oop_map_cache) const;
465
|
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
409
410 void interpreter_frame_set_mirror(oop mirror);
411
412 public:
413 // Entry frames
414 JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
415 JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
416 JavaCallWrapper** entry_frame_call_wrapper_addr() const;
417 intptr_t* entry_frame_argument_at(int offset) const;
418
419 // tells whether there is another chunk of Delta stack above
420 bool entry_frame_is_first() const;
421 bool upcall_stub_frame_is_first() const;
422
423 // Safepoints
424
425 public:
426 oop saved_oop_result(RegisterMap* map) const;
427 void set_saved_oop_result(RegisterMap* map, oop obj);
428
429 static JavaThread** saved_thread_address(const frame& f);
430
431 // For debugging
432 private:
433 const char* print_name() const;
434
435 void describe_pd(FrameValues& values, int frame_no);
436
437 public:
438 void print_value() const { print_value_on(tty); }
439 void print_value_on(outputStream* st) const;
440 void print_on(outputStream* st) const;
441 void interpreter_frame_print_on(outputStream* st) const;
442 void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
443 static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
444
445 #ifndef PRODUCT
446 // Add annotated descriptions of memory locations belonging to this frame to values
447 void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr, bool top = false);
448 #endif
449
450 // Conversion from a VMReg to physical stack location
451 template <typename RegisterMapT>
452 address oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const;
453 template <typename RegisterMapT>
454 oop* oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const;
455
456 // Oops-do's
457 void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) const;
458 void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true) const;
459
460 private:
461 void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f) const;
462
463 // Iteration of oops
464 void oops_do_internal(OopClosure* f, NMethodClosure* cf,
465 DerivedOopClosure* df, DerivedPointerIterationMode derived_mode,
466 const RegisterMap* map, bool use_interpreter_oop_map_cache) const;
467
|