--- a/src/hotspot/share/gc/z/zHeap.inline.hpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/gc/z/zHeap.inline.hpp Thu Oct 17 20:53:35 2019 +0100
@@ -33,7 +33,6 @@
#include "gc/z/zOop.inline.hpp"
#include "gc/z/zPage.inline.hpp"
#include "gc/z/zPageTable.inline.hpp"
-#include "gc/z/zUtils.inline.hpp"
#include "utilities/debug.hpp"
inline ZHeap* ZHeap::heap() {
@@ -45,8 +44,8 @@
return &_reference_processor;
}
-inline uint32_t ZHeap::hash_oop(oop obj) const {
- const uintptr_t offset = ZAddress::offset(ZOop::to_address(obj));
+inline uint32_t ZHeap::hash_oop(uintptr_t addr) const {
+ const uintptr_t offset = ZAddress::offset(addr);
return ZHash::address_to_uint32(offset);
}
@@ -60,10 +59,10 @@
return page->is_object_strongly_live(addr);
}
-template <bool finalizable, bool publish>
+template <bool follow, bool finalizable, bool publish>
inline void ZHeap::mark_object(uintptr_t addr) {
assert(ZGlobalPhase == ZPhaseMark, "Mark not allowed");
- _mark.mark_object<finalizable, publish>(addr);
+ _mark.mark_object<follow, finalizable, publish>(addr);
}
inline uintptr_t ZHeap::alloc_tlab(size_t size) {
@@ -134,8 +133,8 @@
_page_allocator.check_out_of_memory();
}
-inline bool ZHeap::is_oop(oop object) const {
- return ZAddress::is_good(ZOop::to_address(object));
+inline bool ZHeap::is_oop(uintptr_t addr) const {
+ return ZAddress::is_good(addr) && is_object_aligned(addr) && is_in(addr);
}
#endif // SHARE_GC_Z_ZHEAP_INLINE_HPP