8211279: Verify missing object equals barriers

Reviewed-by: pliden, shade, zgu
This commit is contained in:
Roman Kennke 2018-10-03 15:22:16 +02:00
parent a9f9385ced
commit 3085a89f13
12 changed files with 33 additions and 15 deletions

View file

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "oops/oopsHierarchy.hpp"
@ -53,4 +54,15 @@ void oop::unregister_oop() {
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