src/cpu/x86/vm/frame_x86.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8068945-8u-patched Sdiff src/cpu/x86/vm

src/cpu/x86/vm/frame_x86.inline.hpp

Print this page
rev 7386 : 8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
Summary: Introduce the PreserveFramePointer flag to control if RBP is used as the frame pointer or as a general purpose register.
Reviewed-by: kvn, roland, dlong, enevill, shade


  76     _pc = original_pc;
  77     assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
  78     _deopt_state = is_deoptimized;
  79   } else {
  80     _deopt_state = not_deoptimized;
  81   }
  82 }
  83 
  84 inline frame::frame(intptr_t* sp, intptr_t* fp) {
  85   _sp = sp;
  86   _unextended_sp = sp;
  87   _fp = fp;
  88   _pc = (address)(sp[-1]);
  89 
  90   // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
  91   // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
  92   // unlucky the junk value could be to a zombied method and we'll die on the
  93   // find_blob call. This is also why we can have no asserts on the validity
  94   // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
  95   // -> pd_last_frame should use a specialized version of pd_last_frame which could
  96   // call a specilaized frame constructor instead of this one.
  97   // Then we could use the assert below. However this assert is of somewhat dubious
  98   // value.
  99   // assert(_pc != NULL, "no pc?");
 100 
 101   _cb = CodeCache::find_blob(_pc);
 102   adjust_unextended_sp();
 103 
 104   address original_pc = nmethod::get_deopt_original_pc(this);
 105   if (original_pc != NULL) {
 106     _pc = original_pc;
 107     _deopt_state = is_deoptimized;
 108   } else {
 109     _deopt_state = not_deoptimized;
 110   }
 111 }
 112 
 113 // Accessors
 114 
 115 inline bool frame::equal(frame other) const {
 116   bool ret =  sp() == other.sp()




  76     _pc = original_pc;
  77     assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
  78     _deopt_state = is_deoptimized;
  79   } else {
  80     _deopt_state = not_deoptimized;
  81   }
  82 }
  83 
  84 inline frame::frame(intptr_t* sp, intptr_t* fp) {
  85   _sp = sp;
  86   _unextended_sp = sp;
  87   _fp = fp;
  88   _pc = (address)(sp[-1]);
  89 
  90   // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
  91   // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
  92   // unlucky the junk value could be to a zombied method and we'll die on the
  93   // find_blob call. This is also why we can have no asserts on the validity
  94   // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
  95   // -> pd_last_frame should use a specialized version of pd_last_frame which could
  96   // call a specialized frame constructor instead of this one.
  97   // Then we could use the assert below. However this assert is of somewhat dubious
  98   // value.
  99   // assert(_pc != NULL, "no pc?");
 100 
 101   _cb = CodeCache::find_blob(_pc);
 102   adjust_unextended_sp();
 103 
 104   address original_pc = nmethod::get_deopt_original_pc(this);
 105   if (original_pc != NULL) {
 106     _pc = original_pc;
 107     _deopt_state = is_deoptimized;
 108   } else {
 109     _deopt_state = not_deoptimized;
 110   }
 111 }
 112 
 113 // Accessors
 114 
 115 inline bool frame::equal(frame other) const {
 116   bool ret =  sp() == other.sp()


src/cpu/x86/vm/frame_x86.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File