< prev index next >
src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp
Print this page
*** 29,38 ****
--- 29,40 ----
#include "gc/g1/g1ConcurrentMarkBitMap.inline.hpp"
#include "gc/g1/g1FullGCMarker.inline.hpp"
#include "gc/g1/g1FullGCOopClosures.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "memory/iterator.inline.hpp"
+ #include "oops/access.inline.hpp"
+ #include "oops/compressedOops.inline.hpp"
template <typename T>
inline void G1MarkAndPushClosure::do_oop_nv(T* p) {
_marker->mark_and_push(p);
}
*** 48,64 ****
inline void G1MarkAndPushClosure::do_cld_nv(ClassLoaderData* cld) {
_marker->follow_cld(cld);
}
template <class T> inline oop G1AdjustClosure::adjust_pointer(T* p) {
! T heap_oop = oopDesc::load_heap_oop(p);
! if (oopDesc::is_null(heap_oop)) {
// NULL reference, return NULL.
return NULL;
}
! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
assert(Universe::heap()->is_in(obj), "should be in heap");
if (G1ArchiveAllocator::is_archive_object(obj)) {
// Never forwarding archive objects, return current reference.
return obj;
}
--- 50,66 ----
inline void G1MarkAndPushClosure::do_cld_nv(ClassLoaderData* cld) {
_marker->follow_cld(cld);
}
template <class T> inline oop G1AdjustClosure::adjust_pointer(T* p) {
! T heap_oop = RawAccess<>::oop_load(p);
! if (CompressedOops::is_null(heap_oop)) {
// NULL reference, return NULL.
return NULL;
}
! oop obj = CompressedOops::decode_not_null(heap_oop);
assert(Universe::heap()->is_in(obj), "should be in heap");
if (G1ArchiveAllocator::is_archive_object(obj)) {
// Never forwarding archive objects, return current reference.
return obj;
}
*** 74,84 ****
return obj;
}
// Forwarded, update and return new reference.
assert(Universe::heap()->is_in_reserved(forwardee), "should be in object space");
! oopDesc::encode_store_heap_oop_not_null(p, forwardee);
return forwardee;
}
template <class T>
inline void G1AdjustAndRebuildClosure::add_reference(T* from_field, oop reference, uint worker_id) {
--- 76,86 ----
return obj;
}
// Forwarded, update and return new reference.
assert(Universe::heap()->is_in_reserved(forwardee), "should be in object space");
! RawAccess<OOP_NOT_NULL>::oop_store(p, forwardee);
return forwardee;
}
template <class T>
inline void G1AdjustAndRebuildClosure::add_reference(T* from_field, oop reference, uint worker_id) {
< prev index next >