< prev index next >
src/hotspot/share/oops/oopsHierarchy.cpp
Print this page
rev 51997 : 8211279: Verify missing object equals barriers
@@ -21,10 +21,11 @@
* 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,6 +52,17 @@
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 {
+ assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed");
+ return obj() == o.obj();
+}
+
+bool oop::operator!=(const volatile oop o) const {
+ assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed");
+ return obj() != o.obj();
+}
+
#endif // CHECK_UNHANDLED_OOPS
< prev index next >