< prev index next >

src/share/vm/gc_implementation/g1/heapRegion.cpp

Print this page
rev 7697 : imported patch 8069760-remove-duplicate-oop_iterate
rev 7698 : imported patch fix-iterate-oop-kim
rev 7699 : [mq]: fix-iterate-oop-kim2

*** 418,443 **** assert(cur <= start, "Postcondition"); oop obj; HeapWord* next = cur; ! while (next <= start) { cur = next; obj = oop(cur); if (obj->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; } // Otherwise... next = cur + block_size(cur); ! } // If we finish the above loop...We have a parseable object that // begins on or before the start of the memory region, and ends // inside or spans the entire region. assert(cur <= start, "Loop postcondition"); ! assert(obj->klass_or_null() != NULL, "Loop invariant"); do { obj = oop(cur); assert((cur + block_size(cur)) > (HeapWord*)obj, "Loop invariant"); if (obj->klass_or_null() == NULL) { --- 418,443 ---- assert(cur <= start, "Postcondition"); oop obj; HeapWord* next = cur; ! do { cur = next; obj = oop(cur); if (obj->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; } // Otherwise... next = cur + block_size(cur); ! } while (next <= start); // If we finish the above loop...We have a parseable object that // begins on or before the start of the memory region, and ends // inside or spans the entire region. assert(cur <= start, "Loop postcondition"); ! assert(obj->klass_or_null() != NULL, "Loop postcondition"); do { obj = oop(cur); assert((cur + block_size(cur)) > (HeapWord*)obj, "Loop invariant"); if (obj->klass_or_null() == NULL) {
*** 451,461 **** if (!g1h->is_obj_dead(obj)) { // Non-objArrays are sometimes marked imprecise at the object start. We // always need to iterate over them in full. // We only iterate over object arrays in full if they are completely contained // in the memory region. ! if (!obj->is_objArray() || (((HeapWord*)obj) >= start && cur < end)) { obj->oop_iterate(cl); } else { obj->oop_iterate(cl, mr); } } --- 451,461 ---- if (!g1h->is_obj_dead(obj)) { // Non-objArrays are sometimes marked imprecise at the object start. We // always need to iterate over them in full. // We only iterate over object arrays in full if they are completely contained // in the memory region. ! if (!obj->is_objArray() || (((HeapWord*)obj) >= start && cur <= end)) { obj->oop_iterate(cl); } else { obj->oop_iterate(cl, mr); } }
< prev index next >