< prev index next >
src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp
Print this page
rev 13086 : [mq]: partial-fixfullgc.patch
*** 500,509 ****
--- 500,510 ----
}
class ShenandoahAdjustPointersClosure : public MetadataAwareOopClosure {
private:
ShenandoahHeap* _heap;
+ size_t _new_obj_offset;
public:
ShenandoahAdjustPointersClosure() : _heap(ShenandoahHeap::heap()) {
}
*** 517,527 ****
oop forw = oop(BrooksPointer::get_raw(obj));
oopDesc::encode_store_heap_oop(p, forw);
if (UseShenandoahMatrix) {
if (_heap->is_in_reserved(p)) {
assert(_heap->is_in_reserved(forw), "must be in heap");
! _heap->connection_matrix()->set_connected(p, forw);
}
}
}
}
public:
--- 518,528 ----
oop forw = oop(BrooksPointer::get_raw(obj));
oopDesc::encode_store_heap_oop(p, forw);
if (UseShenandoahMatrix) {
if (_heap->is_in_reserved(p)) {
assert(_heap->is_in_reserved(forw), "must be in heap");
! _heap->connection_matrix()->set_connected(((HeapWord*) p) - _new_obj_offset, forw);
}
}
}
}
public:
*** 529,538 ****
--- 530,542 ----
do_oop_work(p);
}
void do_oop(narrowOop* p) {
do_oop_work(p);
}
+ void set_new_obj_offset(size_t new_obj_offset) {
+ _new_obj_offset = new_obj_offset;
+ }
};
class ShenandoahAdjustPointersObjectClosure : public ObjectClosure {
private:
ShenandoahAdjustPointersClosure _cl;
*** 541,552 ****
ShenandoahAdjustPointersObjectClosure() :
_heap(ShenandoahHeap::heap()) {
}
void do_object(oop p) {
assert(_heap->is_marked_complete(p), "must be marked");
! oop forw = oop(BrooksPointer::get_raw(p));
! uint from_idx = _heap->heap_region_index_containing(forw);
p->oop_iterate(&_cl);
}
};
class ShenandoahAdjustPointersTask : public AbstractGangTask {
--- 545,556 ----
ShenandoahAdjustPointersObjectClosure() :
_heap(ShenandoahHeap::heap()) {
}
void do_object(oop p) {
assert(_heap->is_marked_complete(p), "must be marked");
! HeapWord* forw = BrooksPointer::get_raw(p);
! _cl.set_new_obj_offset(((HeapWord*) p) - forw);
p->oop_iterate(&_cl);
}
};
class ShenandoahAdjustPointersTask : public AbstractGangTask {
< prev index next >