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