Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
8241841: Shenandoah: ditch one of allocation type counters in Shenand…
…oahHeapRegion
Reviewed-by: rkennke
- Loading branch information
|
@@ -65,7 +65,6 @@ ShenandoahHeapRegion::ShenandoahHeapRegion(HeapWord* start, size_t index, bool c |
|
|
_top(start), |
|
|
_tlab_allocs(0), |
|
|
_gclab_allocs(0), |
|
|
_shared_allocs(0), |
|
|
_seqnum_last_alloc_mutator(0), |
|
|
_live_data(0), |
|
|
_critical_pins(0), |
|
@@ -315,15 +314,13 @@ void ShenandoahHeapRegion::clear_live_data() { |
|
|
void ShenandoahHeapRegion::reset_alloc_metadata() { |
|
|
_tlab_allocs = 0; |
|
|
_gclab_allocs = 0; |
|
|
_shared_allocs = 0; |
|
|
_seqnum_last_alloc_mutator = 0; |
|
|
} |
|
|
|
|
|
void ShenandoahHeapRegion::reset_alloc_metadata_to_shared() { |
|
|
if (used() > 0) { |
|
|
_tlab_allocs = 0; |
|
|
_gclab_allocs = 0; |
|
|
_shared_allocs = used() >> LogHeapWordSize; |
|
|
if (ShenandoahHeap::heap()->is_traversal_mode()) { |
|
|
update_seqnum_last_alloc_mutator(); |
|
|
} |
|
@@ -339,7 +336,7 @@ void ShenandoahHeapRegion::update_seqnum_last_alloc_mutator() { |
|
|
} |
|
|
|
|
|
size_t ShenandoahHeapRegion::get_shared_allocs() const { |
|
|
return _shared_allocs * HeapWordSize; |
|
|
return used() - (_tlab_allocs + _gclab_allocs) * HeapWordSize; |
|
|
} |
|
|
|
|
|
size_t ShenandoahHeapRegion::get_tlab_allocs() const { |
|
|
|
@@ -254,7 +254,6 @@ class ShenandoahHeapRegion : public CHeapObj<mtGC> { |
|
|
|
|
|
size_t _tlab_allocs; |
|
|
size_t _gclab_allocs; |
|
|
size_t _shared_allocs; |
|
|
|
|
|
uint64_t _seqnum_last_alloc_mutator; |
|
|
|
|
|
|
@@ -55,7 +55,7 @@ inline void ShenandoahHeapRegion::adjust_alloc_metadata(ShenandoahAllocRequest:: |
|
|
switch (type) { |
|
|
case ShenandoahAllocRequest::_alloc_shared: |
|
|
case ShenandoahAllocRequest::_alloc_shared_gc: |
|
|
_shared_allocs += size; |
|
|
// Counted implicitly by tlab/gclab allocs |
|
|
break; |
|
|
case ShenandoahAllocRequest::_alloc_tlab: |
|
|
_tlab_allocs += size; |
|
|