--- old/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-02-17 17:22:56.339248719 +0800 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-02-17 17:22:56.342248827 +0800 @@ -781,7 +781,11 @@ G1RedirtyCardsQueueSet* rdcqs, G1ParScanThreadStateSet* pss); - void expand_heap_after_young_collection(); + void resize_heap_after_young_collection(); + bool expand_heap_after_young_collection(); + void shrink_heap_after_young_collection(); + void expand_heap_after_concurrent_mark(); + // Update object copying statistics. void record_obj_copy_mem_stats(); @@ -1078,7 +1082,7 @@ inline void archive_set_add(HeapRegion* hr); - size_t non_young_capacity_bytes() { + size_t non_young_capacity_bytes() const { return (old_regions_count() + _archive_set.length() + humongous_regions_count()) * HeapRegion::GrainBytes; } @@ -1280,6 +1284,9 @@ // Return the size of reserved memory. Returns different value than max_capacity() when AllocateOldGenAt is used. virtual size_t max_reserved_capacity() const; + // Print the soft maximum heap capacity. + size_t soft_max_capacity() const; + virtual jlong millis_since_last_gc();