--- a/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp Wed Apr 06 10:50:19 2016 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp Wed Apr 06 13:32:48 2016 +0200
@@ -95,8 +95,6 @@
void do_object(oop obj) {
HeapWord* obj_addr = (HeapWord*) obj;
assert(_hr->is_in(obj_addr), "sanity");
- size_t obj_size = obj->size();
- HeapWord* obj_end = obj_addr + obj_size;
if (obj->is_forwarded() && obj->forwardee() == obj) {
// The object failed to move.
@@ -119,8 +117,10 @@
// explicitly and all objects in the CSet are considered
// (implicitly) live. So, we won't mark them explicitly and
// we'll leave them over NTAMS.
- _cm->grayRoot(obj, obj_size, _worker_id, _hr);
+ _cm->grayRoot(obj, _hr);
}
+ size_t obj_size = obj->size();
+
_marked_bytes += (obj_size * HeapWordSize);
obj->set_mark(markOopDesc::prototype());
@@ -138,6 +138,7 @@
// the collection set. So, we'll recreate such entries now.
obj->oop_iterate(_update_rset_cl);
+ HeapWord* obj_end = obj_addr + obj_size;
_last_forwarded_object_end = obj_end;
_hr->cross_threshold(obj_addr, obj_end);
}