--- a/src/hotspot/share/runtime/objectMonitor.inline.hpp Wed Apr 24 15:37:55 2019 +0200
+++ b/src/hotspot/share/runtime/objectMonitor.inline.hpp Wed Apr 24 10:20:25 2019 -0400
@@ -45,10 +45,6 @@
_header = hdr;
}
-inline jint ObjectMonitor::count() const {
- return _count;
-}
-
inline jint ObjectMonitor::waiters() const {
return _waiters;
}
@@ -58,12 +54,12 @@
}
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;
@@ -96,10 +92,10 @@
// 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) {