--- old/src/hotspot/share/gc/z/zStat.hpp 2020-01-21 11:14:30.242186699 +0100 +++ new/src/hotspot/share/gc/z/zStat.hpp 2020-01-21 11:14:28.947160520 +0100 @@ -35,6 +35,7 @@ #include "utilities/ticks.hpp" class ZPage; +class ZRelocationSetSelectorGroupStats; class ZStatSampler; class ZStatSamplerHistory; struct ZStatCounterData; @@ -418,11 +419,25 @@ // class ZStatRelocation : public AllStatic { private: - static size_t _relocating; - static bool _success; - -public: - static void set_at_select_relocation_set(size_t relocating); + struct Group { + size_t _npages; + size_t _total; + size_t _empty; + size_t _compacting_from; + size_t _compacting_to; + }; + + static Group _small; + static Group _medium; + static Group _large; + static bool _success; + + static void print(const char* name, const ZStatRelocation::Group& group); + +public: + static void set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small, + const ZRelocationSetSelectorGroupStats& medium, + const ZRelocationSetSelectorGroupStats& large); static void set_at_relocate_end(bool success); static void print(); @@ -540,8 +555,9 @@ static void set_at_mark_end(size_t capacity, size_t allocated, size_t used); - static void set_at_select_relocation_set(size_t live, - size_t garbage, + static void set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small, + const ZRelocationSetSelectorGroupStats& medium, + const ZRelocationSetSelectorGroupStats& large, size_t reclaimed); static void set_at_relocate_start(size_t capacity, size_t allocated,