# HG changeset patch # User rkennke # Date 1489785236 -3600 # Fri Mar 17 22:13:56 2017 +0100 # Node ID 6c95b74bfdcd2cc994b79a66c33e0bfc2eb9875e # Parent 366aad72d1eec6b478ee233d46b9e18ca8b4eb0b [mq]: partial-fixfullgc.patch diff --git a/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp b/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp --- a/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp +++ b/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp @@ -502,6 +502,7 @@ class ShenandoahAdjustPointersClosure : public MetadataAwareOopClosure { private: ShenandoahHeap* _heap; + size_t _new_obj_offset; public: ShenandoahAdjustPointersClosure() : _heap(ShenandoahHeap::heap()) { @@ -519,7 +520,7 @@ 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); + _heap->connection_matrix()->set_connected(((HeapWord*) p) - _new_obj_offset, forw); } } } @@ -531,6 +532,9 @@ 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 { @@ -543,8 +547,8 @@ } 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); + HeapWord* forw = BrooksPointer::get_raw(p); + _cl.set_new_obj_offset(pointer_delta((HeapWord*) p, forw)); p->oop_iterate(&_cl); } };