hotspot/src/share/vm/runtime/objectMonitor.hpp
changeset 32614 b7b2407bc7e5
parent 31856 614d6786ba55
child 39702 ea7e9375bb93
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp	Wed Sep 02 17:49:46 2015 -0700
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp	Thu Sep 03 10:22:39 2015 -0700
@@ -177,6 +177,19 @@
 
  public:
   static void Initialize();
+
+  // Only perform a PerfData operation if the PerfData object has been
+  // allocated and if the PerfDataManager has not freed the PerfData
+  // objects which can happen at normal VM shutdown.
+  //
+  #define OM_PERFDATA_OP(f, op_str)              \
+    do {                                         \
+      if (ObjectMonitor::_sync_ ## f != NULL &&  \
+          PerfDataManager::has_PerfData()) {     \
+        ObjectMonitor::_sync_ ## f->op_str;      \
+      }                                          \
+    } while (0)
+
   static PerfCounter * _sync_ContendedLockAttempts;
   static PerfCounter * _sync_FutileWakeups;
   static PerfCounter * _sync_Parks;