--- old/src/hotspot/share/gc/g1/heapRegion.hpp 2019-12-04 15:39:04.110684049 +0100 +++ new/src/hotspot/share/gc/g1/heapRegion.hpp 2019-12-04 15:39:03.902682463 +0100 @@ -244,6 +244,8 @@ _prev_top_at_mark_start = _next_top_at_mark_start = bottom(); } + size_t _survivor_bytes; // Bytes in this region survived from previous GC. + // Data for young region survivor prediction. uint _young_index_in_cset; G1SurvRateGroup* _surv_rate_group; @@ -414,6 +416,14 @@ bool is_open_archive() const { return _type.is_open_archive(); } bool is_closed_archive() const { return _type.is_closed_archive(); } + void set_survivor_bytes(size_t bytes) { + assert(is_survivor(), "pre-condition"); + assert(bytes <= used(), "Survivor bytes " SIZE_FORMAT " larger than used() " SIZE_FORMAT, bytes, used()); + _survivor_bytes = bytes; + } + + size_t survivor_bytes() const { return _survivor_bytes; } + void set_free(); void set_eden(); @@ -528,12 +538,12 @@ void calc_gc_efficiency(void); double gc_efficiency() const { return _gc_efficiency;} - uint young_index_in_cset() const { return _young_index_in_cset; } + uint young_index_in_cset() const { return _young_index_in_cset; } void clear_young_index_in_cset() { _young_index_in_cset = 0; } void set_young_index_in_cset(uint index) { assert(index != UINT_MAX, "just checking"); assert(index != 0, "just checking"); - assert(is_young(), "pre-condition"); + assert(is_eden(), "pre-condition" ); _young_index_in_cset = index; }