hotspot/src/share/vm/code/nmethod.hpp
changeset 8658 a173231e8022
parent 8495 a4959965eaa3
child 8662 6d4f3724c1e6
equal deleted inserted replaced
8657:5bb183666ecd 8658:a173231e8022
    67 // cache pc descs found in earlier inquiries
    67 // cache pc descs found in earlier inquiries
    68 class PcDescCache VALUE_OBJ_CLASS_SPEC {
    68 class PcDescCache VALUE_OBJ_CLASS_SPEC {
    69   friend class VMStructs;
    69   friend class VMStructs;
    70  private:
    70  private:
    71   enum { cache_size = 4 };
    71   enum { cache_size = 4 };
    72   PcDesc* _last_pc_desc;         // most recent pc_desc found
       
    73   PcDesc* _pc_descs[cache_size]; // last cache_size pc_descs found
    72   PcDesc* _pc_descs[cache_size]; // last cache_size pc_descs found
    74  public:
    73  public:
    75   PcDescCache() { debug_only(_last_pc_desc = NULL); }
    74   PcDescCache() { debug_only(_pc_descs[0] = NULL); }
    76   void    reset_to(PcDesc* initial_pc_desc);
    75   void    reset_to(PcDesc* initial_pc_desc);
    77   PcDesc* find_pc_desc(int pc_offset, bool approximate);
    76   PcDesc* find_pc_desc(int pc_offset, bool approximate);
    78   void    add_pc_desc(PcDesc* pc_desc);
    77   void    add_pc_desc(PcDesc* pc_desc);
    79   PcDesc* last_pc_desc() { return _last_pc_desc; }
    78   PcDesc* last_pc_desc() { return _pc_descs[0]; }
    80 };
    79 };
    81 
    80 
    82 
    81 
    83 // nmethods (native methods) are the compiled code versions of Java methods.
    82 // nmethods (native methods) are the compiled code versions of Java methods.
    84 //
    83 //
   176   // set during construction
   175   // set during construction
   177   unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.
   176   unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.
   178   unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
   177   unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
   179 
   178 
   180   // Protected by Patching_lock
   179   // Protected by Patching_lock
   181   unsigned char _state;                      // {alive, not_entrant, zombie, unloaded)
   180   unsigned char _state;                      // {alive, not_entrant, zombie, unloaded}
   182 
   181 
   183 #ifdef ASSERT
   182 #ifdef ASSERT
   184   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   183   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   185 #endif
   184 #endif
   186 
   185