< prev index next >

src/hotspot/share/gc/z/zRelocationSetSelector.hpp

Print this page

        

*** 28,80 **** #include "memory/allocation.hpp" class ZPage; class ZRelocationSet; class ZRelocationSetSelectorGroup { private: ! const char* const _name; ! const size_t _page_size; ! const size_t _object_size_limit; ! const size_t _fragmentation_limit; ! ! ZArray<ZPage*> _registered_pages; ! ZPage** _sorted_pages; ! size_t _nselected; ! size_t _relocating; void semi_sort(); public: ZRelocationSetSelectorGroup(const char* name, size_t page_size, size_t object_size_limit); ~ZRelocationSetSelectorGroup(); ! void register_live_page(ZPage* page, size_t garbage); void select(); ZPage* const* selected() const; size_t nselected() const; ! size_t relocating() const; }; class ZRelocationSetSelector : public StackObj { private: ZRelocationSetSelectorGroup _small; ZRelocationSetSelectorGroup _medium; ! size_t _live; ! size_t _garbage; public: ZRelocationSetSelector(); void register_live_page(ZPage* page); void register_garbage_page(ZPage* page); void select(ZRelocationSet* relocation_set); ! size_t live() const; ! size_t garbage() const; ! size_t relocating() const; }; #endif // SHARE_GC_Z_ZRELOCATIONSETSELECTOR_HPP --- 28,105 ---- #include "memory/allocation.hpp" class ZPage; class ZRelocationSet; + class ZRelocationSetSelectorGroupStats { + friend class ZRelocationSetSelectorGroup; + + private: + size_t _npages; + size_t _total; + size_t _live; + size_t _garbage; + size_t _empty; + size_t _compacting_from; + size_t _compacting_to; + + public: + ZRelocationSetSelectorGroupStats(); + + size_t npages() const; + size_t total() const; + size_t live() const; + size_t garbage() const; + size_t empty() const; + size_t compacting_from() const; + size_t compacting_to() const; + }; + class ZRelocationSetSelectorGroup { private: ! const char* const _name; ! const size_t _page_size; ! const size_t _object_size_limit; ! const size_t _fragmentation_limit; ! ! ZArray<ZPage*> _registered_pages; ! ZPage** _sorted_pages; ! size_t _nselected; ! ZRelocationSetSelectorGroupStats _stats; void semi_sort(); public: ZRelocationSetSelectorGroup(const char* name, size_t page_size, size_t object_size_limit); ~ZRelocationSetSelectorGroup(); ! void register_live_page(ZPage* page); ! void register_garbage_page(ZPage* page); void select(); ZPage* const* selected() const; size_t nselected() const; ! ! const ZRelocationSetSelectorGroupStats& stats() const; }; class ZRelocationSetSelector : public StackObj { private: ZRelocationSetSelectorGroup _small; ZRelocationSetSelectorGroup _medium; ! ZRelocationSetSelectorGroup _large; public: ZRelocationSetSelector(); void register_live_page(ZPage* page); void register_garbage_page(ZPage* page); void select(ZRelocationSet* relocation_set); ! const ZRelocationSetSelectorGroupStats& stats_small() const; ! const ZRelocationSetSelectorGroupStats& stats_medium() const; ! const ZRelocationSetSelectorGroupStats& stats_large() const; }; #endif // SHARE_GC_Z_ZRELOCATIONSETSELECTOR_HPP
< prev index next >