src/hotspot/share/runtime/synchronizer.hpp
changeset 53588 a5f46c4690f8
parent 53557 4cfe0e5a3b79
child 54291 e6c86f6012bf
equal deleted inserted replaced
53587:739eaf4ac4ad 53588:a5f46c4690f8
    33 
    33 
    34 class ObjectMonitor;
    34 class ObjectMonitor;
    35 class ThreadsList;
    35 class ThreadsList;
    36 
    36 
    37 struct DeflateMonitorCounters {
    37 struct DeflateMonitorCounters {
    38   int nInuse;             // currently associated with objects
    38   int nInuse;              // currently associated with objects
    39   int nInCirculation;     // extant
    39   int nInCirculation;      // extant
    40   int nScavenged;         // reclaimed (global and per-thread)
    40   int nScavenged;          // reclaimed (global and per-thread)
    41   double perThreadTimes;  // per-thread scavenge times
    41   int perThreadScavenged;  // per-thread scavenge total
       
    42   double perThreadTimes;   // per-thread scavenge times
    42 };
    43 };
    43 
    44 
    44 class ObjectSynchronizer : AllStatic {
    45 class ObjectSynchronizer : AllStatic {
    45   friend class VMStructs;
    46   friend class VMStructs;
    46  public:
    47  public:
   151   static void oops_do(OopClosure* f);
   152   static void oops_do(OopClosure* f);
   152   // Process oops in thread local used monitors
   153   // Process oops in thread local used monitors
   153   static void thread_local_used_oops_do(Thread* thread, OopClosure* f);
   154   static void thread_local_used_oops_do(Thread* thread, OopClosure* f);
   154 
   155 
   155   // debugging
   156   // debugging
       
   157   static void audit_and_print_stats(bool on_exit);
       
   158   static void chk_free_entry(JavaThread * jt, ObjectMonitor * n,
       
   159                              outputStream * out, int *error_cnt_p);
       
   160   static void chk_global_free_list_and_count(outputStream * out,
       
   161                                              int *error_cnt_p);
       
   162   static void chk_global_in_use_list_and_count(outputStream * out,
       
   163                                                int *error_cnt_p);
       
   164   static void chk_in_use_entry(JavaThread * jt, ObjectMonitor * n,
       
   165                                outputStream * out, int *error_cnt_p);
       
   166   static void chk_per_thread_in_use_list_and_count(JavaThread *jt,
       
   167                                                    outputStream * out,
       
   168                                                    int *error_cnt_p);
       
   169   static void chk_per_thread_free_list_and_count(JavaThread *jt,
       
   170                                                  outputStream * out,
       
   171                                                  int *error_cnt_p);
       
   172   static void log_in_use_monitor_details(outputStream * out, bool on_exit);
       
   173   static int  log_monitor_list_counts(outputStream * out);
   156   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
   174   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
   157 
   175 
   158  private:
   176  private:
   159   friend class SynchronizerTest;
   177   friend class SynchronizerTest;
   160 
   178