Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit

Permalink
8242213: Shenandoah: remove ShenandoahHeuristics::_bytes_in_cset
Browse files Browse the repository at this point in the history
Reviewed-by: rkennke
  • Loading branch information
shipilev committed Apr 6, 2020
1 parent 1d687b3 commit 59f28e5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(Shenand


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


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


if ((new_garbage < min_garbage) || (r->garbage() > garbage_threshold)) { if ((new_garbage < min_garbage) || (r->garbage() > garbage_threshold)) {
cset->add_region(r); cset->add_region(r);
_bytes_in_cset += r->used();
cur_cset = new_cset; cur_cset = new_cset;
cur_garbage = new_garbage; cur_garbage = new_garbage;
} }
Expand Down
5 changes: 1 addition & 4 deletions src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ ShenandoahHeuristics::ShenandoahHeuristics() :
_region_data(NULL), _region_data(NULL),
_degenerated_cycles_in_a_row(0), _degenerated_cycles_in_a_row(0),
_successful_cycles_in_a_row(0), _successful_cycles_in_a_row(0),
_bytes_in_cset(0),
_cycle_start(os::elapsedTime()), _cycle_start(os::elapsedTime()),
_last_cycle_end(0), _last_cycle_end(0),
_gc_times_learned(0), _gc_times_learned(0),
Expand Down Expand Up @@ -258,12 +257,10 @@ void ShenandoahHeuristics::record_success_full() {
} }


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


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

// Assume users call System.gc() when external state changes significantly, // Assume users call System.gc() when external state changes significantly,
// which forces us to re-learn the GC timings and allocation rates. // which forces us to re-learn the GC timings and allocation rates.
_gc_times_learned = 0; _gc_times_learned = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahHeuristics.hpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class ShenandoahHeuristics : public CHeapObj<mtGC> {
uint _degenerated_cycles_in_a_row; uint _degenerated_cycles_in_a_row;
uint _successful_cycles_in_a_row; uint _successful_cycles_in_a_row;


size_t _bytes_in_cset;

double _cycle_start; double _cycle_start;
double _last_cycle_end; double _last_cycle_end;


Expand Down

0 comments on commit 59f28e5

Please sign in to comment.