src/hotspot/share/runtime/synchronizer.hpp
changeset 51258 2ce72467c4e8
parent 49037 dc68aeea4840
child 51860 54aafb3ba9ab
equal deleted inserted replaced
51257:979e349059eb 51258:2ce72467c4e8
   151   static void oops_do(OopClosure* f);
   151   static void oops_do(OopClosure* f);
   152   // Process oops in thread local used monitors
   152   // Process oops in thread local used monitors
   153   static void thread_local_used_oops_do(Thread* thread, OopClosure* f);
   153   static void thread_local_used_oops_do(Thread* thread, OopClosure* f);
   154 
   154 
   155   // debugging
   155   // debugging
   156   static void sanity_checks(const bool verbose,
       
   157                             const unsigned int cache_line_size,
       
   158                             int *error_cnt_ptr, int *warning_cnt_ptr);
       
   159   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
   156   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
   160 
   157 
   161  private:
   158  private:
       
   159   friend class SynchronizerTest;
       
   160 
   162   enum { _BLOCKSIZE = 128 };
   161   enum { _BLOCKSIZE = 128 };
   163   // global list of blocks of monitors
   162   // global list of blocks of monitors
   164   static PaddedEnd<ObjectMonitor> * volatile gBlockList;
   163   static PaddedEnd<ObjectMonitor> * volatile gBlockList;
   165   // global monitor free list
   164   // global monitor free list
   166   static ObjectMonitor * volatile gFreeList;
   165   static ObjectMonitor * volatile gFreeList;
   175   // Process oops in all global used monitors (i.e. moribund thread's monitors)
   174   // Process oops in all global used monitors (i.e. moribund thread's monitors)
   176   static void global_used_oops_do(OopClosure* f);
   175   static void global_used_oops_do(OopClosure* f);
   177   // Process oops in monitors on the given list
   176   // Process oops in monitors on the given list
   178   static void list_oops_do(ObjectMonitor* list, OopClosure* f);
   177   static void list_oops_do(ObjectMonitor* list, OopClosure* f);
   179 
   178 
       
   179   // Support for SynchronizerTest access to GVars fields:
       
   180   static u_char* get_gvars_addr();
       
   181   static u_char* get_gvars_hcSequence_addr();
       
   182   static size_t get_gvars_size();
       
   183   static u_char* get_gvars_stwRandom_addr();
   180 };
   184 };
   181 
   185 
   182 // ObjectLocker enforced balanced locking and can never thrown an
   186 // ObjectLocker enforced balanced locking and can never thrown an
   183 // IllegalMonitorStateException. However, a pending exception may
   187 // IllegalMonitorStateException. However, a pending exception may
   184 // have to pass through, and we must also be able to deal with
   188 // have to pass through, and we must also be able to deal with