--- old/src/hotspot/share/gc/shared/generation.cpp Fri Jun 21 17:34:13 2019 +++ new/src/hotspot/share/gc/shared/generation.cpp Fri Jun 21 17:34:12 2019 @@ -68,6 +68,12 @@ return gch->old_gen_spec()->init_size(); } +// This is for CMS. It returns stable monotonic used space size. +// Remove this when CMS is removed. +size_t Generation::used_stable() const { + return used(); +} + size_t Generation::max_capacity() const { return reserved().byte_size(); }