Skip to content
Permalink
Browse files

8242114: Shenandoah: remove ShenandoahHeapRegion::reset_alloc_metadat…

…a_to_shared

Reviewed-by: rkennke
  • Loading branch information
shipilev committed Apr 6, 2020
1 parent 5aed216 commit b73460b366e56dc14d4791e5c83bf46c02a83b86
@@ -313,7 +313,6 @@ HeapWord* ShenandoahFreeSet::allocate_contiguous(ShenandoahAllocRequest& req) {
}

r->set_top(r->bottom() + used_words);
r->reset_alloc_metadata_to_shared();

_mutator_free_bitmap.clear_bit(r->index());
}
@@ -308,15 +308,6 @@ void ShenandoahHeapRegion::reset_alloc_metadata() {
_gclab_allocs = 0;
}

void ShenandoahHeapRegion::reset_alloc_metadata_to_shared() {
if (used() > 0) {
_tlab_allocs = 0;
_gclab_allocs = 0;
} else {
reset_alloc_metadata();
}
}

size_t ShenandoahHeapRegion::get_shared_allocs() const {
return used() - (_tlab_allocs + _gclab_allocs) * HeapWordSize;
}
@@ -377,7 +377,6 @@ class ShenandoahHeapRegion {
size_t free() const { return byte_size(top(), end()); }

inline void adjust_alloc_metadata(ShenandoahAllocRequest::Type type, size_t);
void reset_alloc_metadata_to_shared();
void reset_alloc_metadata();
size_t get_shared_allocs() const;
size_t get_tlab_allocs() const;
@@ -868,7 +868,7 @@ class ShenandoahPostCompactClosure : public ShenandoahHeapRegionClosure {
}

r->set_live_data(live);
r->reset_alloc_metadata_to_shared();
r->reset_alloc_metadata();
_live += live;
}

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

r->reset_alloc_metadata_to_shared();
r->reset_alloc_metadata();
}
}
}

0 comments on commit b73460b

Please sign in to comment.