< prev index next >

src/hotspot/share/code/nmethod.hpp

Print this page




  74 
  75   // Determines whether this nmethod is unloaded when the
  76   // referent in _jvmci_installed_code is cleared. This
  77   // will be false if the referent is initialized to a
  78   // HotSpotNMethod object whose isDefault field is true.
  79   // That is, installed code other than a "default"
  80   // HotSpotNMethod causes nmethod unloading.
  81   // This field is ignored once _jvmci_installed_code is NULL.
  82   bool _jvmci_installed_code_triggers_invalidation;
  83 #endif
  84 
  85   // To support simple linked-list chaining of nmethods:
  86   nmethod*  _osr_link;         // from InstanceKlass::osr_nmethods_head
  87 
  88   static nmethod* volatile _oops_do_mark_nmethods;
  89   nmethod*        volatile _oops_do_mark_link;
  90 
  91   // offsets for entry points
  92   address _entry_point;                      // entry point with class check
  93   address _verified_entry_point;             // entry point without class check


  94   address _osr_entry_point;                  // entry point for on stack replacement
  95 
  96   // Offsets for different nmethod parts
  97   int  _exception_offset;
  98   // Offset of the unwind handler if it exists
  99   int _unwind_handler_offset;
 100 
 101   int _consts_offset;
 102   int _stub_offset;
 103   int _oops_offset;                       // offset to where embedded oop table begins (inside data)
 104   int _metadata_offset;                   // embedded meta data table
 105   int _scopes_data_offset;
 106   int _scopes_pcs_offset;
 107   int _dependencies_offset;
 108   int _handler_table_offset;
 109   int _nul_chk_table_offset;
 110   int _nmethod_end_offset;
 111 
 112   int code_offset() const { return (address) code_begin() - header_begin(); }
 113 


 308   int metadata_size     () const                  { return (address)  metadata_end     () - (address)  metadata_begin     (); }
 309   int dependencies_size () const                  { return            dependencies_end () -            dependencies_begin (); }
 310 
 311   int     oops_count() const { assert(oops_size() % oopSize == 0, "");  return (oops_size() / oopSize) + 1; }
 312   int metadata_count() const { assert(metadata_size() % wordSize == 0, ""); return (metadata_size() / wordSize) + 1; }
 313 
 314   int total_size        () const;
 315 
 316   void dec_hotness_counter()        { _hotness_counter--; }
 317   void set_hotness_counter(int val) { _hotness_counter = val; }
 318   int  hotness_counter() const      { return _hotness_counter; }
 319 
 320   // Containment
 321   bool oops_contains         (oop*    addr) const { return oops_begin         () <= addr && addr < oops_end         (); }
 322   bool metadata_contains     (Metadata** addr) const   { return metadata_begin     () <= addr && addr < metadata_end     (); }
 323   bool scopes_data_contains  (address addr) const { return scopes_data_begin  () <= addr && addr < scopes_data_end  (); }
 324   bool scopes_pcs_contains   (PcDesc* addr) const { return scopes_pcs_begin   () <= addr && addr < scopes_pcs_end   (); }
 325 
 326   // entry points
 327   address entry_point() const                     { return _entry_point;             } // normal entry point
 328   address verified_entry_point() const            { return _verified_entry_point;    } // if klass is correct


 329 
 330   // flag accessing and manipulation
 331   bool  is_not_installed() const                  { return _state == not_installed; }
 332   bool  is_in_use() const                         { return _state <= in_use; }
 333   bool  is_alive() const                          { return _state < zombie; }
 334   bool  is_not_entrant() const                    { return _state == not_entrant; }
 335   bool  is_zombie() const                         { return _state == zombie; }
 336   bool  is_unloaded() const                       { return _state == unloaded; }
 337 
 338   void clear_unloading_state();
 339   virtual bool is_unloading();
 340   virtual void do_unloading(bool unloading_occurred);
 341 
 342 #if INCLUDE_RTM_OPT
 343   // rtm state accessing and manipulating
 344   RTMState  rtm_state() const                     { return _rtm_state; }
 345   void set_rtm_state(RTMState state)              { _rtm_state = state; }
 346 #endif
 347 
 348   void make_in_use()                              { _state = in_use; }




  74 
  75   // Determines whether this nmethod is unloaded when the
  76   // referent in _jvmci_installed_code is cleared. This
  77   // will be false if the referent is initialized to a
  78   // HotSpotNMethod object whose isDefault field is true.
  79   // That is, installed code other than a "default"
  80   // HotSpotNMethod causes nmethod unloading.
  81   // This field is ignored once _jvmci_installed_code is NULL.
  82   bool _jvmci_installed_code_triggers_invalidation;
  83 #endif
  84 
  85   // To support simple linked-list chaining of nmethods:
  86   nmethod*  _osr_link;         // from InstanceKlass::osr_nmethods_head
  87 
  88   static nmethod* volatile _oops_do_mark_nmethods;
  89   nmethod*        volatile _oops_do_mark_link;
  90 
  91   // offsets for entry points
  92   address _entry_point;                      // entry point with class check
  93   address _verified_entry_point;             // entry point without class check
  94   address _verified_value_entry_point;       // value type entry point (unpack all value args) without class check
  95   address _verified_value_ro_entry_point;    // value type entry point (unpack receiver only) without class check
  96   address _osr_entry_point;                  // entry point for on stack replacement
  97 
  98   // Offsets for different nmethod parts
  99   int  _exception_offset;
 100   // Offset of the unwind handler if it exists
 101   int _unwind_handler_offset;
 102 
 103   int _consts_offset;
 104   int _stub_offset;
 105   int _oops_offset;                       // offset to where embedded oop table begins (inside data)
 106   int _metadata_offset;                   // embedded meta data table
 107   int _scopes_data_offset;
 108   int _scopes_pcs_offset;
 109   int _dependencies_offset;
 110   int _handler_table_offset;
 111   int _nul_chk_table_offset;
 112   int _nmethod_end_offset;
 113 
 114   int code_offset() const { return (address) code_begin() - header_begin(); }
 115 


 310   int metadata_size     () const                  { return (address)  metadata_end     () - (address)  metadata_begin     (); }
 311   int dependencies_size () const                  { return            dependencies_end () -            dependencies_begin (); }
 312 
 313   int     oops_count() const { assert(oops_size() % oopSize == 0, "");  return (oops_size() / oopSize) + 1; }
 314   int metadata_count() const { assert(metadata_size() % wordSize == 0, ""); return (metadata_size() / wordSize) + 1; }
 315 
 316   int total_size        () const;
 317 
 318   void dec_hotness_counter()        { _hotness_counter--; }
 319   void set_hotness_counter(int val) { _hotness_counter = val; }
 320   int  hotness_counter() const      { return _hotness_counter; }
 321 
 322   // Containment
 323   bool oops_contains         (oop*    addr) const { return oops_begin         () <= addr && addr < oops_end         (); }
 324   bool metadata_contains     (Metadata** addr) const   { return metadata_begin     () <= addr && addr < metadata_end     (); }
 325   bool scopes_data_contains  (address addr) const { return scopes_data_begin  () <= addr && addr < scopes_data_end  (); }
 326   bool scopes_pcs_contains   (PcDesc* addr) const { return scopes_pcs_begin   () <= addr && addr < scopes_pcs_end   (); }
 327 
 328   // entry points
 329   address entry_point() const                     { return _entry_point;             }       // normal entry point
 330   address verified_entry_point() const            { return _verified_entry_point;    }       // normal entry point without class check
 331   address verified_value_entry_point() const      { return _verified_value_entry_point; }    // value type entry point (unpack all value args) without class check
 332   address verified_value_ro_entry_point() const   { return _verified_value_ro_entry_point; } // value type entry point (only unpack receiver) without class check
 333 
 334   // flag accessing and manipulation
 335   bool  is_not_installed() const                  { return _state == not_installed; }
 336   bool  is_in_use() const                         { return _state <= in_use; }
 337   bool  is_alive() const                          { return _state < zombie; }
 338   bool  is_not_entrant() const                    { return _state == not_entrant; }
 339   bool  is_zombie() const                         { return _state == zombie; }
 340   bool  is_unloaded() const                       { return _state == unloaded; }
 341 
 342   void clear_unloading_state();
 343   virtual bool is_unloading();
 344   virtual void do_unloading(bool unloading_occurred);
 345 
 346 #if INCLUDE_RTM_OPT
 347   // rtm state accessing and manipulating
 348   RTMState  rtm_state() const                     { return _rtm_state; }
 349   void set_rtm_state(RTMState state)              { _rtm_state = state; }
 350 #endif
 351 
 352   void make_in_use()                              { _state = in_use; }


< prev index next >