hotspot/src/share/vm/runtime/thread.hpp
changeset 22810 3a4dae5224c7
parent 18025 b7bcf7497f93
child 22823 40b2c6c30123
equal deleted inserted replaced
22809:8f0522f038d3 22810:3a4dae5224c7
   891     stack_guard_enabled         // enabled
   891     stack_guard_enabled         // enabled
   892   };
   892   };
   893 
   893 
   894  private:
   894  private:
   895 
   895 
   896   StackGuardState        _stack_guard_state;
   896   StackGuardState  _stack_guard_state;
       
   897 
       
   898   // Precompute the limit of the stack as used in stack overflow checks.
       
   899   // We load it from here to simplify the stack overflow check in assembly.
       
   900   address          _stack_overflow_limit;
   897 
   901 
   898   // Compiler exception handling (NOTE: The _exception_oop is *NOT* the same as _pending_exception. It is
   902   // Compiler exception handling (NOTE: The _exception_oop is *NOT* the same as _pending_exception. It is
   899   // used to temp. parsing values into and out of the runtime system during exception handling for compiled
   903   // used to temp. parsing values into and out of the runtime system during exception handling for compiled
   900   // code)
   904   // code)
   901   volatile oop     _exception_oop;               // Exception thrown in compiled code
   905   volatile oop     _exception_oop;               // Exception thrown in compiled code
  1299   bool reguard_stack(address cur_sp);
  1303   bool reguard_stack(address cur_sp);
  1300   // Similar to above but see if current stackpoint is out of the guard area
  1304   // Similar to above but see if current stackpoint is out of the guard area
  1301   // and reguard if possible.
  1305   // and reguard if possible.
  1302   bool reguard_stack(void);
  1306   bool reguard_stack(void);
  1303 
  1307 
       
  1308   address stack_overflow_limit() { return _stack_overflow_limit; }
       
  1309   void set_stack_overflow_limit() {
       
  1310     _stack_overflow_limit = _stack_base - _stack_size +
       
  1311                             ((StackShadowPages +
       
  1312                               StackYellowPages +
       
  1313                               StackRedPages) * os::vm_page_size());
       
  1314   }
       
  1315 
  1304   // Misc. accessors/mutators
  1316   // Misc. accessors/mutators
  1305   void set_do_not_unlock(void)                   { _do_not_unlock_if_synchronized = true; }
  1317   void set_do_not_unlock(void)                   { _do_not_unlock_if_synchronized = true; }
  1306   void clr_do_not_unlock(void)                   { _do_not_unlock_if_synchronized = false; }
  1318   void clr_do_not_unlock(void)                   { _do_not_unlock_if_synchronized = false; }
  1307   bool do_not_unlock(void)                       { return _do_not_unlock_if_synchronized; }
  1319   bool do_not_unlock(void)                       { return _do_not_unlock_if_synchronized; }
  1308 
  1320 
  1333   static ByteSize saved_exception_pc_offset()    { return byte_offset_of(JavaThread, _saved_exception_pc  ); }
  1345   static ByteSize saved_exception_pc_offset()    { return byte_offset_of(JavaThread, _saved_exception_pc  ); }
  1334   static ByteSize osthread_offset()              { return byte_offset_of(JavaThread, _osthread            ); }
  1346   static ByteSize osthread_offset()              { return byte_offset_of(JavaThread, _osthread            ); }
  1335   static ByteSize exception_oop_offset()         { return byte_offset_of(JavaThread, _exception_oop       ); }
  1347   static ByteSize exception_oop_offset()         { return byte_offset_of(JavaThread, _exception_oop       ); }
  1336   static ByteSize exception_pc_offset()          { return byte_offset_of(JavaThread, _exception_pc        ); }
  1348   static ByteSize exception_pc_offset()          { return byte_offset_of(JavaThread, _exception_pc        ); }
  1337   static ByteSize exception_handler_pc_offset()  { return byte_offset_of(JavaThread, _exception_handler_pc); }
  1349   static ByteSize exception_handler_pc_offset()  { return byte_offset_of(JavaThread, _exception_handler_pc); }
       
  1350   static ByteSize stack_overflow_limit_offset()  { return byte_offset_of(JavaThread, _stack_overflow_limit); }
  1338   static ByteSize is_method_handle_return_offset() { return byte_offset_of(JavaThread, _is_method_handle_return); }
  1351   static ByteSize is_method_handle_return_offset() { return byte_offset_of(JavaThread, _is_method_handle_return); }
  1339   static ByteSize stack_guard_state_offset()     { return byte_offset_of(JavaThread, _stack_guard_state   ); }
  1352   static ByteSize stack_guard_state_offset()     { return byte_offset_of(JavaThread, _stack_guard_state   ); }
  1340   static ByteSize suspend_flags_offset()         { return byte_offset_of(JavaThread, _suspend_flags       ); }
  1353   static ByteSize suspend_flags_offset()         { return byte_offset_of(JavaThread, _suspend_flags       ); }
  1341 
  1354 
  1342   static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); }
  1355   static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); }