hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp

Print this page




  51 
  52  public:
  53   static ByteSize zero_stack_offset() {
  54     return byte_offset_of(JavaThread, _zero_stack);
  55   }
  56   static ByteSize top_zero_frame_offset() {
  57     return byte_offset_of(JavaThread, _top_zero_frame);
  58   }
  59 
  60  public:
  61   void record_base_of_stack_pointer() {
  62     assert(top_zero_frame() == NULL, "junk on stack prior to Java call");
  63   }
  64   void set_base_of_stack_pointer(intptr_t* base_sp) {
  65     assert(base_sp == NULL, "should be");
  66     assert(top_zero_frame() == NULL, "junk on stack after Java call");
  67   }
  68 
  69  public:
  70   void set_last_Java_frame() {
  71     set_last_Java_frame(top_zero_frame());
  72   }
  73   void reset_last_Java_frame() {
  74     set_last_Java_frame(NULL);
  75   }
  76   void set_last_Java_frame(ZeroFrame* frame) {
  77     frame_anchor()->set_last_Java_sp((intptr_t *) frame);





  78   }
  79 
  80  private:
  81   frame pd_last_frame() {
  82     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
  83     return frame(last_Java_sp(), zero_stack()->sp());
  84   }
  85 
  86  public:
  87   // Check for pending suspend requests and pending asynchronous
  88   // exceptions.  There are separate accessors for these, but
  89   // _suspend_flags is volatile so using them would be unsafe.
  90   bool has_special_condition_for_native_trans() {
  91     return _suspend_flags != 0;
  92   }
  93 
  94  public:
  95   bool pd_get_top_frame_for_signal_handler(frame* fr_addr,
  96                                            void* ucontext,
  97                                            bool isInJava) {
  98     ShouldNotCallThis();
  99   }
 100 
 101   // These routines are only used on cpu architectures that
 102   // have separate register stacks (Itanium).
 103   static bool register_stack_overflow() { return false; }


  51 
  52  public:
  53   static ByteSize zero_stack_offset() {
  54     return byte_offset_of(JavaThread, _zero_stack);
  55   }
  56   static ByteSize top_zero_frame_offset() {
  57     return byte_offset_of(JavaThread, _top_zero_frame);
  58   }
  59 
  60  public:
  61   void record_base_of_stack_pointer() {
  62     assert(top_zero_frame() == NULL, "junk on stack prior to Java call");
  63   }
  64   void set_base_of_stack_pointer(intptr_t* base_sp) {
  65     assert(base_sp == NULL, "should be");
  66     assert(top_zero_frame() == NULL, "junk on stack after Java call");
  67   }
  68 
  69  public:
  70   void set_last_Java_frame() {
  71     set_last_Java_frame(top_zero_frame(), zero_stack()->sp());
  72   }
  73   void reset_last_Java_frame() {
  74     frame_anchor()->zap();
  75   }
  76   void set_last_Java_frame(ZeroFrame* fp, intptr_t* sp) {
  77     frame_anchor()->set(sp, NULL, fp);
  78   }
  79 
  80  public:
  81   ZeroFrame* last_Java_fp() {
  82     return frame_anchor()->last_Java_fp();
  83   }
  84 
  85  private:
  86   frame pd_last_frame() {
  87     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
  88     return frame(last_Java_fp(), last_Java_sp());
  89   }
  90 
  91  public:
  92   // Check for pending suspend requests and pending asynchronous
  93   // exceptions.  There are separate accessors for these, but
  94   // _suspend_flags is volatile so using them would be unsafe.
  95   bool has_special_condition_for_native_trans() {
  96     return _suspend_flags != 0;
  97   }
  98 
  99  public:
 100   bool pd_get_top_frame_for_signal_handler(frame* fr_addr,
 101                                            void* ucontext,
 102                                            bool isInJava) {
 103     ShouldNotCallThis();
 104   }
 105 
 106   // These routines are only used on cpu architectures that
 107   // have separate register stacks (Itanium).
 108   static bool register_stack_overflow() { return false; }