< prev index next >

src/cpu/aarch64/vm/frame_aarch64.inline.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


  30 #include "code/vmreg.inline.hpp"
  31 
  32 // Inline functions for AArch64 frames:
  33 
  34 // Constructors:
  35 
  36 inline frame::frame() {
  37   _pc = NULL;
  38   _sp = NULL;
  39   _unextended_sp = NULL;
  40   _fp = NULL;
  41   _cb = NULL;
  42   _deopt_state = unknown;
  43 }
  44 
  45 static int spin;
  46 
  47 inline void frame::init(intptr_t* sp, intptr_t* fp, address pc) {
  48   intptr_t a = intptr_t(sp);
  49   intptr_t b = intptr_t(fp);
  50 #ifndef PRODUCT
  51   if (fp)
  52     if (sp > fp || (fp - sp > 0x100000))
  53       for(;;)
  54         asm("nop");
  55 #endif
  56   _sp = sp;
  57   _unextended_sp = sp;
  58   _fp = fp;
  59   _pc = pc;
  60   assert(pc != NULL, "no pc?");
  61   _cb = CodeCache::find_blob(pc);
  62   adjust_unextended_sp();
  63 
  64   address original_pc = nmethod::get_deopt_original_pc(this);
  65   if (original_pc != NULL) {
  66     _pc = original_pc;
  67     _deopt_state = is_deoptimized;
  68   } else {
  69     _deopt_state = not_deoptimized;
  70   }
  71 }
  72 
  73 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
  74   init(sp, fp, pc);
  75 }




  30 #include "code/vmreg.inline.hpp"
  31 
  32 // Inline functions for AArch64 frames:
  33 
  34 // Constructors:
  35 
  36 inline frame::frame() {
  37   _pc = NULL;
  38   _sp = NULL;
  39   _unextended_sp = NULL;
  40   _fp = NULL;
  41   _cb = NULL;
  42   _deopt_state = unknown;
  43 }
  44 
  45 static int spin;
  46 
  47 inline void frame::init(intptr_t* sp, intptr_t* fp, address pc) {
  48   intptr_t a = intptr_t(sp);
  49   intptr_t b = intptr_t(fp);






  50   _sp = sp;
  51   _unextended_sp = sp;
  52   _fp = fp;
  53   _pc = pc;
  54   assert(pc != NULL, "no pc?");
  55   _cb = CodeCache::find_blob(pc);
  56   adjust_unextended_sp();
  57 
  58   address original_pc = nmethod::get_deopt_original_pc(this);
  59   if (original_pc != NULL) {
  60     _pc = original_pc;
  61     _deopt_state = is_deoptimized;
  62   } else {
  63     _deopt_state = not_deoptimized;
  64   }
  65 }
  66 
  67 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
  68   init(sp, fp, pc);
  69 }


< prev index next >