< prev index next >

src/hotspot/share/runtime/frame.hpp

Print this page




 252   oop retrieve_receiver(RegisterMap *reg_map);
 253 
 254   // Return the monitor owner and BasicLock for compiled synchronized
 255   // native methods so that biased locking can revoke the receiver's
 256   // bias if necessary.  This is also used by JVMTI's GetLocalInstance method
 257   // (via VM_GetReceiver) to retrieve the receiver from a native wrapper frame.
 258   BasicLock* get_native_monitor();
 259   oop        get_native_receiver();
 260 
 261   // Find receiver for an invoke when arguments are just pushed on stack (i.e., callee stack-frame is
 262   // not setup)
 263   oop interpreter_callee_receiver(Symbol* signature)     { return *interpreter_callee_receiver_addr(signature); }
 264 
 265 
 266   oop* interpreter_callee_receiver_addr(Symbol* signature);
 267 
 268 
 269   // expression stack (may go up or down, direction == 1 or -1)
 270  public:
 271   intptr_t* interpreter_frame_expression_stack() const;
 272   static  jint  interpreter_frame_expression_stack_direction();
 273 
 274   // The _at version returns a pointer because the address is used for GC.
 275   intptr_t* interpreter_frame_expression_stack_at(jint offset) const;
 276 
 277   // top of expression stack
 278   intptr_t* interpreter_frame_tos_at(jint offset) const;
 279   intptr_t* interpreter_frame_tos_address() const;
 280 
 281 
 282   jint  interpreter_frame_expression_stack_size() const;
 283 
 284   intptr_t* interpreter_frame_sender_sp() const;
 285 
 286 #ifndef CC_INTERP
 287   // template based interpreter deoptimization support
 288   void  set_interpreter_frame_sender_sp(intptr_t* sender_sp);
 289   void interpreter_frame_set_monitor_end(BasicObjectLock* value);
 290 #endif // CC_INTERP
 291 
 292   // Address of the temp oop in the frame. Needed as GC root.


 445 // StackFrameStream iterates through the frames of a thread starting from
 446 // top most frame. It automatically takes care of updating the location of
 447 // all (callee-saved) registers. Notice: If a thread is stopped at
 448 // a safepoint, all registers are saved, not only the callee-saved ones.
 449 //
 450 // Use:
 451 //
 452 //   for(StackFrameStream fst(thread); !fst.is_done(); fst.next()) {
 453 //     ...
 454 //   }
 455 //
 456 class StackFrameStream : public StackObj {
 457  private:
 458   frame       _fr;
 459   RegisterMap _reg_map;
 460   bool        _is_done;
 461  public:
 462    StackFrameStream(JavaThread *thread, bool update = true);
 463 
 464   // Iteration
 465   bool is_done()                  { return (_is_done) ? true : (_is_done = _fr.is_first_frame(), false); }
 466   void next()                     { if (!_is_done) _fr = _fr.sender(&_reg_map); }
 467 
 468   // Query
 469   frame *current()                { return &_fr; }
 470   RegisterMap* register_map()     { return &_reg_map; }
 471 };
 472 
 473 #endif // SHARE_VM_RUNTIME_FRAME_HPP


 252   oop retrieve_receiver(RegisterMap *reg_map);
 253 
 254   // Return the monitor owner and BasicLock for compiled synchronized
 255   // native methods so that biased locking can revoke the receiver's
 256   // bias if necessary.  This is also used by JVMTI's GetLocalInstance method
 257   // (via VM_GetReceiver) to retrieve the receiver from a native wrapper frame.
 258   BasicLock* get_native_monitor();
 259   oop        get_native_receiver();
 260 
 261   // Find receiver for an invoke when arguments are just pushed on stack (i.e., callee stack-frame is
 262   // not setup)
 263   oop interpreter_callee_receiver(Symbol* signature)     { return *interpreter_callee_receiver_addr(signature); }
 264 
 265 
 266   oop* interpreter_callee_receiver_addr(Symbol* signature);
 267 
 268 
 269   // expression stack (may go up or down, direction == 1 or -1)
 270  public:
 271   intptr_t* interpreter_frame_expression_stack() const;

 272 
 273   // The _at version returns a pointer because the address is used for GC.
 274   intptr_t* interpreter_frame_expression_stack_at(jint offset) const;
 275 
 276   // top of expression stack
 277   intptr_t* interpreter_frame_tos_at(jint offset) const;
 278   intptr_t* interpreter_frame_tos_address() const;
 279 
 280 
 281   jint  interpreter_frame_expression_stack_size() const;
 282 
 283   intptr_t* interpreter_frame_sender_sp() const;
 284 
 285 #ifndef CC_INTERP
 286   // template based interpreter deoptimization support
 287   void  set_interpreter_frame_sender_sp(intptr_t* sender_sp);
 288   void interpreter_frame_set_monitor_end(BasicObjectLock* value);
 289 #endif // CC_INTERP
 290 
 291   // Address of the temp oop in the frame. Needed as GC root.


 444 // StackFrameStream iterates through the frames of a thread starting from
 445 // top most frame. It automatically takes care of updating the location of
 446 // all (callee-saved) registers. Notice: If a thread is stopped at
 447 // a safepoint, all registers are saved, not only the callee-saved ones.
 448 //
 449 // Use:
 450 //
 451 //   for(StackFrameStream fst(thread); !fst.is_done(); fst.next()) {
 452 //     ...
 453 //   }
 454 //
 455 class StackFrameStream : public StackObj {
 456  private:
 457   frame       _fr;
 458   RegisterMap _reg_map;
 459   bool        _is_done;
 460  public:
 461    StackFrameStream(JavaThread *thread, bool update = true);
 462 
 463   // Iteration
 464   inline bool is_done();
 465   void next()                     { if (!_is_done) _fr = _fr.sender(&_reg_map); }
 466 
 467   // Query
 468   frame *current()                { return &_fr; }
 469   RegisterMap* register_map()     { return &_reg_map; }
 470 };
 471 
 472 #endif // SHARE_VM_RUNTIME_FRAME_HPP
< prev index next >