src/hotspot/share/runtime/synchronizer.cpp
changeset 58177 4932dce35882
parent 58083 9046db64ca39
child 58291 a013100f7a35
--- a/src/hotspot/share/runtime/synchronizer.cpp	Tue Sep 17 09:51:02 2019 +0200
+++ b/src/hotspot/share/runtime/synchronizer.cpp	Tue Sep 17 09:51:02 2019 +0200
@@ -171,7 +171,7 @@
 
   if (mark.has_monitor()) {
     ObjectMonitor* const mon = mark.monitor();
-    assert(oopDesc::equals((oop) mon->object(), obj), "invariant");
+    assert(mon->object() == obj, "invariant");
     if (mon->owner() != self) return false;  // slow-path for IMS exception
 
     if (mon->first_waiter() != NULL) {
@@ -215,7 +215,7 @@
 
   if (mark.has_monitor()) {
     ObjectMonitor* const m = mark.monitor();
-    assert(oopDesc::equals((oop) m->object(), obj), "invariant");
+    assert(m->object() == obj, "invariant");
     Thread* const owner = (Thread *) m->_owner;
 
     // Lock contention and Transactional Lock Elision (TLE) diagnostics
@@ -1301,7 +1301,7 @@
       ObjectMonitor* inf = mark.monitor();
       markWord dmw = inf->header();
       assert(dmw.is_neutral(), "invariant: header=" INTPTR_FORMAT, dmw.value());
-      assert(oopDesc::equals((oop) inf->object(), object), "invariant");
+      assert(inf->object() == object, "invariant");
       assert(ObjectSynchronizer::verify_objmon_isinpool(inf), "monitor is invalid");
       return inf;
     }