--- old/src/hotspot/share/gc/g1/g1Policy.hpp 2019-12-04 15:39:01.446663732 +0100 +++ new/src/hotspot/share/gc/g1/g1Policy.hpp 2019-12-04 15:39:01.242662177 +0100 @@ -85,7 +85,9 @@ // The survivor rate groups below must be initialized after the predictor because they // indirectly use it through the "this" object passed to their constructor. G1SurvRateGroup* _eden_surv_rate_group; - G1SurvRateGroup* _survivor_surv_rate_group; + + size_t _survivor_used_bytes_at_start; + size_t _survivor_used_bytes_at_end; double _reserve_factor; // This will be set when the heap is expanded @@ -131,11 +133,6 @@ hr->install_surv_rate_group(_eden_surv_rate_group); } - void set_region_survivor(HeapRegion* hr) { - assert(hr->is_survivor(), "pre-condition"); - hr->install_surv_rate_group(_survivor_surv_rate_group); - } - void record_rs_length(size_t rs_length) { _rs_length = rs_length; } @@ -157,7 +154,6 @@ bool update = should_update_surv_rate_group_predictors(); _eden_surv_rate_group->all_surviving_words_recorded(predictor(), update); - _survivor_surv_rate_group->all_surviving_words_recorded(predictor(), update); } G1MMUTracker* mmu_tracker() { @@ -312,7 +308,7 @@ virtual void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set); void note_gc_start(); - + bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0); bool about_to_start_mixed_phase() const; @@ -405,6 +401,8 @@ AgeTable _survivors_age_table; + size_t _surviving_survivor_words; + size_t desired_survivor_size(uint max_regions) const; // Fraction used when predicting how many optional regions to include in @@ -423,18 +421,14 @@ return _max_survivor_regions; } - void note_start_adding_survivor_regions() { - _survivor_surv_rate_group->start_adding_regions(); - } - - void note_stop_adding_survivor_regions() { - _survivor_surv_rate_group->stop_adding_regions(); - } - void record_age_table(AgeTable* age_table) { _survivors_age_table.merge(age_table); } + void record_surviving_survivor_words(size_t words) { + _surviving_survivor_words += words; + } + void print_age_table(); void update_max_gc_locker_expansion();