< prev index next >

src/hotspot/share/services/virtualMemoryTracker.hpp

Print this page
rev 57511 : [mq]: metaspace-improvement

*** 26,36 **** #define SHARE_SERVICES_VIRTUALMEMORYTRACKER_HPP #if INCLUDE_NMT #include "memory/allocation.hpp" ! #include "memory/metaspace.hpp" #include "services/allocationSite.hpp" #include "services/nmtCommon.hpp" #include "utilities/linkedlist.hpp" #include "utilities/nativeCallStack.hpp" #include "utilities/ostream.hpp" --- 26,36 ---- #define SHARE_SERVICES_VIRTUALMEMORYTRACKER_HPP #if INCLUDE_NMT #include "memory/allocation.hpp" ! #include "memory/metaspace/metaspaceEnums.hpp" #include "services/allocationSite.hpp" #include "services/nmtCommon.hpp" #include "utilities/linkedlist.hpp" #include "utilities/nativeCallStack.hpp" #include "utilities/ostream.hpp"
*** 418,446 **** }; class MetaspaceSnapshot : public ResourceObj { private: ! size_t _reserved_in_bytes[Metaspace::MetadataTypeCount]; ! size_t _committed_in_bytes[Metaspace::MetadataTypeCount]; ! size_t _used_in_bytes[Metaspace::MetadataTypeCount]; ! size_t _free_in_bytes[Metaspace::MetadataTypeCount]; public: MetaspaceSnapshot(); ! size_t reserved_in_bytes(Metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _reserved_in_bytes[type]; } ! size_t committed_in_bytes(Metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _committed_in_bytes[type]; } ! size_t used_in_bytes(Metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _used_in_bytes[type]; } ! size_t free_in_bytes(Metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _free_in_bytes[type]; } static void snapshot(MetaspaceSnapshot& s); private: ! static void snapshot(Metaspace::MetadataType type, MetaspaceSnapshot& s); ! static void assert_valid_metadata_type(Metaspace::MetadataType type) { ! assert(type == Metaspace::ClassType || type == Metaspace::NonClassType, "Invalid metadata type"); } }; #endif // INCLUDE_NMT --- 418,446 ---- }; class MetaspaceSnapshot : public ResourceObj { private: ! size_t _reserved_in_bytes[metaspace::MetadataTypeCount]; ! size_t _committed_in_bytes[metaspace::MetadataTypeCount]; ! size_t _used_in_bytes[metaspace::MetadataTypeCount]; ! size_t _free_in_bytes[metaspace::MetadataTypeCount]; public: MetaspaceSnapshot(); ! size_t reserved_in_bytes(metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _reserved_in_bytes[type]; } ! size_t committed_in_bytes(metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _committed_in_bytes[type]; } ! size_t used_in_bytes(metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _used_in_bytes[type]; } ! size_t free_in_bytes(metaspace::MetadataType type) const { assert_valid_metadata_type(type); return _free_in_bytes[type]; } static void snapshot(MetaspaceSnapshot& s); private: ! static void snapshot(metaspace::MetadataType type, MetaspaceSnapshot& s); ! static void assert_valid_metadata_type(metaspace::MetadataType type) { ! assert(type == metaspace::ClassType || type == metaspace::NonClassType, "Invalid metadata type"); } }; #endif // INCLUDE_NMT
< prev index next >