equal
deleted
inserted
replaced
24 #include "precompiled.hpp" |
24 #include "precompiled.hpp" |
25 #include "gc/shenandoah/shenandoahAsserts.hpp" |
25 #include "gc/shenandoah/shenandoahAsserts.hpp" |
26 #include "gc/shenandoah/shenandoahBarrierSet.hpp" |
26 #include "gc/shenandoah/shenandoahBarrierSet.hpp" |
27 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" |
27 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" |
28 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" |
28 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" |
|
29 #include "gc/shenandoah/shenandoahForwarding.hpp" |
29 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
30 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
30 #include "gc/shenandoah/shenandoahHeuristics.hpp" |
31 #include "gc/shenandoah/shenandoahHeuristics.hpp" |
31 #include "gc/shenandoah/shenandoahTraversalGC.hpp" |
32 #include "gc/shenandoah/shenandoahTraversalGC.hpp" |
32 #include "memory/iterator.inline.hpp" |
33 #include "memory/iterator.inline.hpp" |
33 #include "runtime/interfaceSupport.inline.hpp" |
34 #include "runtime/interfaceSupport.inline.hpp" |
259 _heap->marking_context() : _heap->complete_marking_context(); |
260 _heap->marking_context() : _heap->complete_marking_context(); |
260 |
261 |
261 ShenandoahHeapRegion* r = _heap->heap_region_containing(obj); |
262 ShenandoahHeapRegion* r = _heap->heap_region_containing(obj); |
262 assert(r->is_cset(), "sanity"); |
263 assert(r->is_cset(), "sanity"); |
263 |
264 |
264 HeapWord* cur = (HeapWord*)obj + obj->size() + ShenandoahBrooksPointer::word_size(); |
265 HeapWord* cur = (HeapWord*)obj + obj->size() + ShenandoahForwarding::word_size(); |
265 |
266 |
266 size_t count = 0; |
267 size_t count = 0; |
267 while ((cur < r->top()) && ctx->is_marked(oop(cur)) && (count++ < max)) { |
268 while ((cur < r->top()) && ctx->is_marked(oop(cur)) && (count++ < max)) { |
268 oop cur_oop = oop(cur); |
269 oop cur_oop = oop(cur); |
269 if (oopDesc::equals_raw(cur_oop, resolve_forwarded_not_null(cur_oop))) { |
270 if (oopDesc::equals_raw(cur_oop, resolve_forwarded_not_null(cur_oop))) { |
270 _heap->evacuate_object(cur_oop, thread); |
271 _heap->evacuate_object(cur_oop, thread); |
271 } |
272 } |
272 cur = cur + cur_oop->size() + ShenandoahBrooksPointer::word_size(); |
273 cur = cur + cur_oop->size() + ShenandoahForwarding::word_size(); |
273 } |
274 } |
274 } |
275 } |
275 |
276 |
276 return res_oop; |
277 return res_oop; |
277 } |
278 } |