< prev index next >

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

Print this page

        

@@ -36,10 +36,11 @@
 #include "oops/access.inline.hpp"
 #include "oops/compressedOops.inline.hpp"
 #include "oops/oopsHierarchy.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/prefetch.inline.hpp"
+#include "utilities/align.hpp"
 
 template <class T>
 inline void G1ScanClosureBase::prefetch_and_push(T* p, const oop obj) {
   // We're not going to even bother checking whether the object is
   // already forwarded or not, as this usually causes an immediate

@@ -113,11 +114,12 @@
 inline static void check_obj_during_refinement(T* p, oop const obj) {
 #ifdef ASSERT
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
   // can't do because of races
   // assert(oopDesc::is_oop_or_null(obj), "expected an oop");
-  g1h->check_oop_location(obj);
+  assert(is_object_aligned(obj), "oop must be aligned");
+  assert(g1h->is_in_reserved(obj), "oop must be in reserved");
 
   HeapRegion* from = g1h->heap_region_containing(p);
 
   assert(from != NULL, "from region must be non-NULL");
   assert(from->is_in_reserved(p) ||
< prev index next >