< prev index next >

src/hotspot/share/gc/parallel/psScavenge.cpp

Print this page

        

@@ -45,10 +45,12 @@
 #include "gc/shared/referenceProcessor.hpp"
 #include "gc/shared/spaceDecorator.hpp"
 #include "gc/shared/weakProcessor.hpp"
 #include "memory/resourceArea.hpp"
 #include "logging/log.hpp"
+#include "oops/access.inline.hpp"
+#include "oops/compressedOops.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/vmThread.hpp"

@@ -91,12 +93,11 @@
 
     assert(_promotion_manager != NULL, "Sanity");
   }
 
   template <class T> void do_oop_work(T* p) {
-    assert (!oopDesc::is_null(*p), "expected non-null ref");
-    assert (oopDesc::is_oop(oopDesc::load_decode_heap_oop_not_null(p)),
+    assert (oopDesc::is_oop(RawAccess<OOP_NOT_NULL>::oop_load(p)),
             "expected an oop while scanning weak refs");
 
     // Weak refs may be visited more than once.
     if (PSScavenge::should_scavenge(p, _to_space)) {
       _promotion_manager->copy_and_push_safe_barrier<T, /*promote_immediately=*/false>(p);

@@ -736,11 +737,11 @@
 // Adaptive size policy support.  When the young generation/old generation
 // boundary moves, _young_generation_boundary must be reset
 void PSScavenge::set_young_generation_boundary(HeapWord* v) {
   _young_generation_boundary = v;
   if (UseCompressedOops) {
-    _young_generation_boundary_compressed = (uintptr_t)oopDesc::encode_heap_oop((oop)v);
+    _young_generation_boundary_compressed = (uintptr_t)CompressedOops::encode((oop)v);
   }
 }
 
 void PSScavenge::initialize() {
   // Arguments must have been parsed
< prev index next >