src/hotspot/share/code/nmethod.hpp
changeset 54122 4b1426ed1c44
parent 53641 c572eb605087
child 54150 5529640c5f67
equal deleted inserted replaced
54121:fce463e39f72 54122:4b1426ed1c44
   129 
   129 
   130 #ifdef ASSERT
   130 #ifdef ASSERT
   131   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   131   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   132 #endif
   132 #endif
   133 
   133 
   134   jbyte _scavenge_root_state;
       
   135 
       
   136 #if INCLUDE_RTM_OPT
   134 #if INCLUDE_RTM_OPT
   137   // RTM state at compile time. Used during deoptimization to decide
   135   // RTM state at compile time. Used during deoptimization to decide
   138   // whether to restart collecting RTM locking abort statistic again.
   136   // whether to restart collecting RTM locking abort statistic again.
   139   RTMState _rtm_state;
   137   RTMState _rtm_state;
   140 #endif
   138 #endif
   408 
   406 
   409 public:
   407 public:
   410   void fix_oop_relocations(address begin, address end) { fix_oop_relocations(begin, end, false); }
   408   void fix_oop_relocations(address begin, address end) { fix_oop_relocations(begin, end, false); }
   411   void fix_oop_relocations()                           { fix_oop_relocations(NULL, NULL, false); }
   409   void fix_oop_relocations()                           { fix_oop_relocations(NULL, NULL, false); }
   412 
   410 
   413   // Scavengable oop support
       
   414   bool  on_scavenge_root_list() const                  { return (_scavenge_root_state & 1) != 0; }
       
   415  protected:
       
   416   enum { sl_on_list = 0x01, sl_marked = 0x10 };
       
   417   void  set_on_scavenge_root_list()                    { _scavenge_root_state = sl_on_list; }
       
   418   void  clear_on_scavenge_root_list()                  { _scavenge_root_state = 0; }
       
   419   // assertion-checking and pruning logic uses the bits of _scavenge_root_state
       
   420 #ifndef PRODUCT
       
   421   void  set_scavenge_root_marked()                     { _scavenge_root_state |= sl_marked; }
       
   422   void  clear_scavenge_root_marked()                   { _scavenge_root_state &= ~sl_marked; }
       
   423   bool  scavenge_root_not_marked()                     { return (_scavenge_root_state &~ sl_on_list) == 0; }
       
   424   // N.B. there is no positive marked query, and we only use the not_marked query for asserts.
       
   425 #endif //PRODUCT
       
   426   nmethod* scavenge_root_link() const                  { return _scavenge_root_link; }
       
   427   void     set_scavenge_root_link(nmethod *n)          { _scavenge_root_link = n; }
       
   428 
       
   429  public:
       
   430 
       
   431   // Sweeper support
   411   // Sweeper support
   432   long  stack_traversal_mark()                    { return _stack_traversal_mark; }
   412   long  stack_traversal_mark()                    { return _stack_traversal_mark; }
   433   void  set_stack_traversal_mark(long l)          { _stack_traversal_mark = l; }
   413   void  set_stack_traversal_mark(long l)          { _stack_traversal_mark = l; }
   434 
   414 
   435   // implicit exceptions support
   415   // implicit exceptions support
   502 #endif
   482 #endif
   503 
   483 
   504  public:
   484  public:
   505   void oops_do(OopClosure* f) { oops_do(f, false); }
   485   void oops_do(OopClosure* f) { oops_do(f, false); }
   506   void oops_do(OopClosure* f, bool allow_zombie);
   486   void oops_do(OopClosure* f, bool allow_zombie);
   507   bool detect_scavenge_root_oops();
       
   508   void verify_scavenge_root_oops() PRODUCT_RETURN;
       
   509 
   487 
   510   bool test_set_oops_do_mark();
   488   bool test_set_oops_do_mark();
   511   static void oops_do_marking_prologue();
   489   static void oops_do_marking_prologue();
   512   static void oops_do_marking_epilogue();
   490   static void oops_do_marking_epilogue();
   513   static bool oops_do_marking_is_active() { return _oops_do_mark_nmethods != NULL; }
   491   static bool oops_do_marking_is_active() { return _oops_do_mark_nmethods != NULL; }