< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp

Print this page
rev 55608 : Rename ShenandoahBrooksPointer to ShenandoahForwarding
rev 55609 : Eliminate extra forwarding pointer per object

*** 21,31 **** * */ #include "precompiled.hpp" #include "memory/allocation.hpp" - #include "gc/shenandoah/shenandoahForwarding.hpp" #include "gc/shenandoah/shenandoahHeapRegionSet.inline.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegion.hpp" #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp" #include "gc/shenandoah/shenandoahTraversalGC.hpp" --- 21,30 ----
*** 450,474 **** } } void ShenandoahHeapRegion::oop_iterate_objects(OopIterateClosure* blk) { assert(! is_humongous(), "no humongous region here"); ! HeapWord* obj_addr = bottom() + ShenandoahForwarding::word_size(); HeapWord* t = top(); // Could call objects iterate, but this is easier. while (obj_addr < t) { oop obj = oop(obj_addr); ! obj_addr += obj->oop_iterate_size(blk) + ShenandoahForwarding::word_size(); } } void ShenandoahHeapRegion::oop_iterate_humongous(OopIterateClosure* blk) { assert(is_humongous(), "only humongous region here"); // Find head. ShenandoahHeapRegion* r = humongous_start_region(); assert(r->is_humongous_start(), "need humongous head here"); ! oop obj = oop(r->bottom() + ShenandoahForwarding::word_size()); obj->oop_iterate(blk, MemRegion(bottom(), top())); } ShenandoahHeapRegion* ShenandoahHeapRegion::humongous_start_region() const { assert(is_humongous(), "Must be a part of the humongous region"); --- 449,473 ---- } } void ShenandoahHeapRegion::oop_iterate_objects(OopIterateClosure* blk) { assert(! is_humongous(), "no humongous region here"); ! HeapWord* obj_addr = bottom(); HeapWord* t = top(); // Could call objects iterate, but this is easier. while (obj_addr < t) { oop obj = oop(obj_addr); ! obj_addr += obj->oop_iterate_size(blk); } } void ShenandoahHeapRegion::oop_iterate_humongous(OopIterateClosure* blk) { assert(is_humongous(), "only humongous region here"); // Find head. ShenandoahHeapRegion* r = humongous_start_region(); assert(r->is_humongous_start(), "need humongous head here"); ! oop obj = oop(r->bottom()); obj->oop_iterate(blk, MemRegion(bottom(), top())); } ShenandoahHeapRegion* ShenandoahHeapRegion::humongous_start_region() const { assert(is_humongous(), "Must be a part of the humongous region");
*** 503,517 **** "p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(p), p2i(bottom()), p2i(end())); if (p >= top()) { return top(); } else { ! HeapWord* last = bottom() + ShenandoahForwarding::word_size(); HeapWord* cur = last; while (cur <= p) { last = cur; ! cur += oop(cur)->size() + ShenandoahForwarding::word_size(); } shenandoah_assert_correct(NULL, oop(last)); return last; } } --- 502,516 ---- "p (" PTR_FORMAT ") not in space [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(p), p2i(bottom()), p2i(end())); if (p >= top()) { return top(); } else { ! HeapWord* last = bottom(); HeapWord* cur = last; while (cur <= p) { last = cur; ! cur += oop(cur)->size(); } shenandoah_assert_correct(NULL, oop(last)); return last; } }
< prev index next >