< prev index next >

src/hotspot/share/oops/oopsHierarchy.cpp

Print this page
rev 51949 : 8211279: Verify missing object equals barriers

*** 21,30 **** --- 21,31 ---- * questions. * */ #include "precompiled.hpp" + #include "gc/shared/barrierSet.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "oops/oopsHierarchy.hpp" #include "runtime/thread.inline.hpp" #include "utilities/globalDefinitions.hpp"
*** 51,56 **** --- 52,68 ---- Thread* t = Thread::current_or_null(); if (t != NULL && t->is_Java_thread()) { t->unhandled_oops()->unregister_unhandled_oop(this); } } + + bool oop::operator==(const oop o) const { + BarrierSet::barrier_set()->verify_equals(this, o); + return obj() == o.obj(); + } + + bool oop::operator!=(const volatile oop o) const { + BarrierSet::barrier_set()->verify_equals(this, o); + return obj() != o.obj(); + } + #endif // CHECK_UNHANDLED_OOPS
< prev index next >