< prev index next >

src/hotspot/share/runtime/objectMonitor.inline.hpp

Print this page
rev 54415 : 8222295: more baseline cleanups from Async Monitor Deflation project

@@ -43,29 +43,25 @@
 
 inline void ObjectMonitor::set_header(markOop hdr) {
   _header = hdr;
 }
 
-inline jint ObjectMonitor::count() const {
-  return _count;
-}
-
 inline jint ObjectMonitor::waiters() const {
   return _waiters;
 }
 
 inline void* ObjectMonitor::owner() const {
   return _owner;
 }
 
 inline void ObjectMonitor::clear() {
-  assert(_header != NULL, "Fatal logic error in ObjectMonitor header!");
-  assert(_count == 0, "Fatal logic error in ObjectMonitor count!");
-  assert(_waiters == 0, "Fatal logic error in ObjectMonitor waiters!");
-  assert(_recursions == 0, "Fatal logic error in ObjectMonitor recursions!");
-  assert(_object != NULL, "Fatal logic error in ObjectMonitor object!");
-  assert(_owner == NULL, "Fatal logic error in ObjectMonitor owner!");
+  assert(_header != NULL, "must be non-NULL");
+  assert(_contentions == 0, "must be 0: contentions=%d", _contentions);
+  assert(_waiters == 0, "must be 0: waiters=%d", _waiters);
+  assert(_recursions == 0, "must be 0: recursions=" INTPTR_FORMAT, _recursions);
+  assert(_object != NULL, "must be non-NULL");
+  assert(_owner == NULL, "must be NULL: owner=" INTPTR_FORMAT, p2i(_owner));
 
   _header = NULL;
   _object = NULL;
 }
 

@@ -94,14 +90,14 @@
   return true;
 }
 
 // return number of threads contending for this monitor
 inline jint ObjectMonitor::contentions() const {
-  return _count;
+  return _contentions;
 }
 
-// Do NOT set _count = 0. There is a race such that _count could
+// Do NOT set _contentions = 0. There is a race such that _contentions could
 // be set while inflating prior to setting _owner
 // Just use Atomic::inc/dec and assert 0 when monitor put on free list
 inline void ObjectMonitor::set_owner(void* owner) {
   _owner = owner;
   _recursions = 0;
< prev index next >