Skip to content

Commit b73460b

Browse files
committedApr 6, 2020
8242114: Shenandoah: remove ShenandoahHeapRegion::reset_alloc_metadata_to_shared
Reviewed-by: rkennke
1 parent 5aed216 commit b73460b

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed
 

‎src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ HeapWord* ShenandoahFreeSet::allocate_contiguous(ShenandoahAllocRequest& req) {
313313
}
314314

315315
r->set_top(r->bottom() + used_words);
316-
r->reset_alloc_metadata_to_shared();
317316

318317
_mutator_free_bitmap.clear_bit(r->index());
319318
}

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

-9
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,6 @@ void ShenandoahHeapRegion::reset_alloc_metadata() {
308308
_gclab_allocs = 0;
309309
}
310310

311-
void ShenandoahHeapRegion::reset_alloc_metadata_to_shared() {
312-
if (used() > 0) {
313-
_tlab_allocs = 0;
314-
_gclab_allocs = 0;
315-
} else {
316-
reset_alloc_metadata();
317-
}
318-
}
319-
320311
size_t ShenandoahHeapRegion::get_shared_allocs() const {
321312
return used() - (_tlab_allocs + _gclab_allocs) * HeapWordSize;
322313
}

‎src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ class ShenandoahHeapRegion {
377377
size_t free() const { return byte_size(top(), end()); }
378378

379379
inline void adjust_alloc_metadata(ShenandoahAllocRequest::Type type, size_t);
380-
void reset_alloc_metadata_to_shared();
381380
void reset_alloc_metadata();
382381
size_t get_shared_allocs() const;
383382
size_t get_tlab_allocs() const;

‎src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ class ShenandoahPostCompactClosure : public ShenandoahHeapRegionClosure {
868868
}
869869

870870
r->set_live_data(live);
871-
r->reset_alloc_metadata_to_shared();
871+
r->reset_alloc_metadata();
872872
_live += live;
873873
}
874874

@@ -934,7 +934,7 @@ void ShenandoahMarkCompact::compact_humongous_objects() {
934934
r->set_top(r->end());
935935
}
936936

937-
r->reset_alloc_metadata_to_shared();
937+
r->reset_alloc_metadata();
938938
}
939939
}
940940
}

0 commit comments

Comments
 (0)
Please sign in to comment.