< prev index next >

src/share/vm/runtime/synchronizer.hpp

Print this page
rev 13233 : 8180932: Parallelize safepoint cleanup
Summary: Provide infrastructure to do safepoint cleanup tasks using parallel worker threads
Reviewed-by: dholmes, rehn, dcubed, thartmann

@@ -30,10 +30,16 @@
 #include "runtime/handles.hpp"
 #include "runtime/perfData.hpp"
 
 class ObjectMonitor;
 
+struct DeflateMonitorCounters {
+  int nInuse;          // currently associated with objects
+  int nInCirculation;  // extant
+  int nScavenged;      // reclaimed
+};
+
 class ObjectSynchronizer : AllStatic {
   friend class VMStructs;
  public:
   typedef enum {
     owner_self,

@@ -125,11 +131,15 @@
   static void monitors_iterate(MonitorClosure* m);
 
   // GC: we current use aggressive monitor deflation policy
   // Basically we deflate all monitors that are not busy.
   // An adaptive profile-based deflation policy could be used if needed
-  static void deflate_idle_monitors();
+  static void deflate_idle_monitors(DeflateMonitorCounters* counters);
+  static void deflate_thread_local_monitors(Thread* thread, DeflateMonitorCounters* counters);
+  static void prepare_deflate_idle_monitors(DeflateMonitorCounters* counters);
+  static void finish_deflate_idle_monitors(DeflateMonitorCounters* counters);
+
   // For a given monitor list: global or per-thread, deflate idle monitors
   static int deflate_monitor_list(ObjectMonitor** listheadp,
                                   ObjectMonitor** freeHeadp,
                                   ObjectMonitor** freeTailp);
   static bool deflate_monitor(ObjectMonitor* mid, oop obj,
< prev index next >