< prev index next >

src/cpu/aarch64/vm/frame_aarch64.hpp

Print this page
rev 8300 : 8079564: Use FP register as proper frame pointer in JIT compiled code on aarch64
Summary: Add support for PreserveFramePointer for debug/profile
Reviewed-by: duke


 150 
 151  private:
 152   // an additional field beyond _sp and _pc:
 153   intptr_t*   _fp; // frame pointer
 154   // The interpreter and adapters will extend the frame of the caller.
 155   // Since oopMaps are based on the sp of the caller before extension
 156   // we need to know that value. However in order to compute the address
 157   // of the return address we need the real "raw" sp. Since sparc already
 158   // uses sp() to mean "raw" sp and unextended_sp() to mean the caller's
 159   // original sp we use that convention.
 160 
 161   intptr_t*     _unextended_sp;
 162   void adjust_unextended_sp();
 163 
 164   intptr_t* ptr_at_addr(int offset) const {
 165     return (intptr_t*) addr_at(offset);
 166   }
 167 
 168 #ifdef ASSERT
 169   // Used in frame::sender_for_{interpreter,compiled}_frame
 170   static void verify_deopt_original_pc(   nmethod* nm, intptr_t* unextended_sp, bool is_method_handle_return = false);
 171   static void verify_deopt_mh_original_pc(nmethod* nm, intptr_t* unextended_sp) {
 172     verify_deopt_original_pc(nm, unextended_sp, true);
 173   }
 174 #endif
 175 
 176  public:
 177   // Constructors
 178 
 179   frame(intptr_t* sp, intptr_t* fp, address pc);
 180 
 181   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
 182 
 183   frame(intptr_t* sp, intptr_t* fp);
 184 
 185   void init(intptr_t* sp, intptr_t* fp, address pc);
 186 
 187   // accessors for the instance variables
 188   // Note: not necessarily the real 'frame pointer' (see real_fp)
 189   intptr_t*   fp() const { return _fp; }
 190 
 191   inline address* sender_pc_addr() const;
 192 
 193   // expression stack tos if we are nested in a java call


 150 
 151  private:
 152   // an additional field beyond _sp and _pc:
 153   intptr_t*   _fp; // frame pointer
 154   // The interpreter and adapters will extend the frame of the caller.
 155   // Since oopMaps are based on the sp of the caller before extension
 156   // we need to know that value. However in order to compute the address
 157   // of the return address we need the real "raw" sp. Since sparc already
 158   // uses sp() to mean "raw" sp and unextended_sp() to mean the caller's
 159   // original sp we use that convention.
 160 
 161   intptr_t*     _unextended_sp;
 162   void adjust_unextended_sp();
 163 
 164   intptr_t* ptr_at_addr(int offset) const {
 165     return (intptr_t*) addr_at(offset);
 166   }
 167 
 168 #ifdef ASSERT
 169   // Used in frame::sender_for_{interpreter,compiled}_frame
 170   static void verify_deopt_original_pc(   nmethod* nm, intptr_t* unextended_sp);



 171 #endif
 172 
 173  public:
 174   // Constructors
 175 
 176   frame(intptr_t* sp, intptr_t* fp, address pc);
 177 
 178   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
 179 
 180   frame(intptr_t* sp, intptr_t* fp);
 181 
 182   void init(intptr_t* sp, intptr_t* fp, address pc);
 183 
 184   // accessors for the instance variables
 185   // Note: not necessarily the real 'frame pointer' (see real_fp)
 186   intptr_t*   fp() const { return _fp; }
 187 
 188   inline address* sender_pc_addr() const;
 189 
 190   // expression stack tos if we are nested in a java call
< prev index next >