< prev index next >
src/hotspot/share/gc/g1/heapRegion.cpp
Print this page
*** 37,46 ****
--- 37,48 ----
#include "gc/shared/space.inline.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/iterator.hpp"
#include "memory/resourceArea.hpp"
+ #include "oops/access.inline.hpp"
+ #include "oops/compressedOops.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "utilities/growableArray.hpp"
*** 323,335 ****
const HeapRegion* _hr;
bool _failures;
bool _has_oops_in_region;
template <class T> void do_oop_work(T* p) {
! T heap_oop = oopDesc::load_heap_oop(p);
! if (!oopDesc::is_null(heap_oop)) {
! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
// Note: not all the oops embedded in the nmethod are in the
// current region. We only look at those which are.
if (_hr->is_in(obj)) {
// Object is in the region. Check that its less than top
--- 325,337 ----
const HeapRegion* _hr;
bool _failures;
bool _has_oops_in_region;
template <class T> void do_oop_work(T* p) {
! T heap_oop = RawAccess<>::oop_load(p);
! if (!CompressedOops::is_null(heap_oop)) {
! oop obj = CompressedOops::decode_not_null(heap_oop);
// Note: not all the oops embedded in the nmethod are in the
// current region. We only look at those which are.
if (_hr->is_in(obj)) {
// Object is in the region. Check that its less than top
*** 504,517 ****
verify_liveness(p);
}
template <class T>
void verify_liveness(T* p) {
! T heap_oop = oopDesc::load_heap_oop(p);
Log(gc, verify) log;
! if (!oopDesc::is_null(heap_oop)) {
! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
bool failed = false;
if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead_cond(obj, _vo)) {
MutexLockerEx x(ParGCRareEvent_lock,
Mutex::_no_safepoint_check_flag);
--- 506,519 ----
verify_liveness(p);
}
template <class T>
void verify_liveness(T* p) {
! T heap_oop = RawAccess<>::oop_load(p);
Log(gc, verify) log;
! if (!CompressedOops::is_null(heap_oop)) {
! oop obj = CompressedOops::decode_not_null(heap_oop);
bool failed = false;
if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead_cond(obj, _vo)) {
MutexLockerEx x(ParGCRareEvent_lock,
Mutex::_no_safepoint_check_flag);
*** 560,573 ****
verify_remembered_set(p);
}
template <class T>
void verify_remembered_set(T* p) {
! T heap_oop = oopDesc::load_heap_oop(p);
Log(gc, verify) log;
! if (!oopDesc::is_null(heap_oop)) {
! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p);
HeapRegion* to = _g1h->heap_region_containing(obj);
if (from != NULL && to != NULL &&
from != to &&
!to->is_pinned()) {
--- 562,575 ----
verify_remembered_set(p);
}
template <class T>
void verify_remembered_set(T* p) {
! T heap_oop = RawAccess<>::oop_load(p);
Log(gc, verify) log;
! if (!CompressedOops::is_null(heap_oop)) {
! oop obj = CompressedOops::decode_not_null(heap_oop);
HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p);
HeapRegion* to = _g1h->heap_region_containing(obj);
if (from != NULL && to != NULL &&
from != to &&
!to->is_pinned()) {
< prev index next >