Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit 8a79f26

Browse files
committed
8240217: Shenandoah: remove ShenandoahEvacAssist
Reviewed-by: rkennke
1 parent 6ad1db4 commit 8a79f26

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

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

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -144,43 +144,8 @@ oop ShenandoahBarrierSet::load_reference_barrier_mutator_work(oop obj, T* load_a
144144
if (obj == fwd) {
145145
assert(_heap->is_gc_in_progress_mask(ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL),
146146
"evac should be in progress");
147-
148-
ShenandoahEvacOOMScope oom_evac_scope;
149-
150-
Thread* thread = Thread::current();
151-
oop res_oop = _heap->evacuate_object(obj, thread);
152-
153-
// Since we are already here and paid the price of getting through runtime call adapters
154-
// and acquiring oom-scope, it makes sense to try and evacuate more adjacent objects,
155-
// thus amortizing the overhead. For sparsely live heaps, scan costs easily dominate
156-
// total assist costs, and can introduce a lot of evacuation latency. This is why we
157-
// only scan for _nearest_ N objects, regardless if they are eligible for evac or not.
158-
// The scan itself should also avoid touching the non-marked objects below TAMS, because
159-
// their metadata (notably, klasses) may be incorrect already.
160-
161-
size_t max = ShenandoahEvacAssist;
162-
if (max > 0) {
163-
// Traversal is special: it uses incomplete marking context, because it coalesces evac with mark.
164-
// Other code uses complete marking context, because evac happens after the mark.
165-
ShenandoahMarkingContext* ctx = _heap->is_concurrent_traversal_in_progress() ?
166-
_heap->marking_context() : _heap->complete_marking_context();
167-
168-
ShenandoahHeapRegion* r = _heap->heap_region_containing(obj);
169-
assert(r->is_cset(), "sanity");
170-
171-
HeapWord* cur = cast_from_oop<HeapWord*>(obj) + obj->size();
172-
173-
size_t count = 0;
174-
while ((cur < r->top()) && ctx->is_marked(oop(cur)) && (count++ < max)) {
175-
oop cur_oop = oop(cur);
176-
if (cur_oop == resolve_forwarded_not_null_mutator(cur_oop)) {
177-
_heap->evacuate_object(cur_oop, thread);
178-
}
179-
cur = cur + cur_oop->size();
180-
}
181-
}
182-
183-
fwd = res_oop;
147+
ShenandoahEvacOOMScope scope;
148+
fwd = _heap->evacuate_object(obj, Thread::current());
184149
}
185150

186151
if (load_addr != NULL && fwd != obj) {

src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@
235235
"evacuation reserve/waste is incorrect, at the risk that " \
236236
"application allocations run out of memory too early.") \
237237
\
238-
experimental(uintx, ShenandoahEvacAssist, 10, \
239-
"How many objects to evacuate on LRB assist path. " \
240-
"Use zero to disable.") \
241-
\
242238
experimental(bool, ShenandoahPacing, true, \
243239
"Pace application allocations to give GC chance to start " \
244240
"and complete before allocation failure is reached.") \

0 commit comments

Comments
 (0)