src/hotspot/share/memory/heapShared.inline.hpp
changeset 52062 8dbf1a13af49
parent 51720 b7bfd64e43a6
child 53244 9807daeb47c4
--- a/src/hotspot/share/memory/heapShared.inline.hpp	Tue Oct 09 12:36:51 2018 -0700
+++ b/src/hotspot/share/memory/heapShared.inline.hpp	Tue Oct 09 15:58:07 2018 -0400
@@ -27,9 +27,16 @@
 
 #include "oops/compressedOops.inline.hpp"
 #include "memory/heapShared.hpp"
+#if INCLUDE_G1GC
+#include "gc/g1/g1Allocator.inline.hpp"
+#endif
 
 #if INCLUDE_CDS_JAVA_HEAP
 
+bool HeapShared::is_archived_object(oop p) {
+  return (p == NULL) ? false : G1ArchiveAllocator::is_archived_object(p);
+}
+
 inline oop HeapShared::decode_from_archive(narrowOop v) {
   assert(!CompressedOops::is_null(v), "narrow oop value can never be zero");
   oop result = (oop)(void*)((uintptr_t)_narrow_oop_base + ((uintptr_t)v << _narrow_oop_shift));