Skip to content
Permalink
Browse files

8242213: Shenandoah: remove ShenandoahHeuristics::_bytes_in_cset

Reviewed-by: rkennke
  • Loading branch information
shipilev committed Apr 6, 2020
1 parent 1d687b3 commit 59f28e56a23338a7520f56a4f4efb2b752431fef
@@ -76,7 +76,6 @@ void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(Shenand

size_t cur_cset = 0;
size_t cur_garbage = 0;
_bytes_in_cset = 0;

for (size_t idx = 0; idx < size; idx++) {
ShenandoahHeapRegion* r = data[idx]._region;
@@ -90,7 +89,6 @@ void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(Shenand

if ((new_garbage < min_garbage) || (r->garbage() > garbage_threshold)) {
cset->add_region(r);
_bytes_in_cset += r->used();
cur_cset = new_cset;
cur_garbage = new_garbage;
}
@@ -46,7 +46,6 @@ ShenandoahHeuristics::ShenandoahHeuristics() :
_region_data(NULL),
_degenerated_cycles_in_a_row(0),
_successful_cycles_in_a_row(0),
_bytes_in_cset(0),
_cycle_start(os::elapsedTime()),
_last_cycle_end(0),
_gc_times_learned(0),
@@ -258,12 +257,10 @@ void ShenandoahHeuristics::record_success_full() {
}

void ShenandoahHeuristics::record_allocation_failure_gc() {
_bytes_in_cset = 0;
// Do nothing.
}

void ShenandoahHeuristics::record_requested_gc() {
_bytes_in_cset = 0;

// Assume users call System.gc() when external state changes significantly,
// which forces us to re-learn the GC timings and allocation rates.
_gc_times_learned = 0;
@@ -82,8 +82,6 @@ class ShenandoahHeuristics : public CHeapObj<mtGC> {
uint _degenerated_cycles_in_a_row;
uint _successful_cycles_in_a_row;

size_t _bytes_in_cset;

double _cycle_start;
double _last_cycle_end;

0 comments on commit 59f28e5

Please sign in to comment.