src/share/vm/memory/metaspaceShared.hpp

Print this page

        

*** 22,31 **** --- 22,32 ---- * */ #ifndef SHARE_VM_MEMORY_METASPACE_SHARED_HPP #define SHARE_VM_MEMORY_METASPACE_SHARED_HPP + #include "classfile/compactHashtable.hpp" #include "memory/allocation.hpp" #include "memory/memRegion.hpp" #include "runtime/virtualspace.hpp" #include "utilities/exceptions.hpp" #include "utilities/macros.hpp"
*** 43,58 **** --- 44,68 ---- Shared ##region## Size = FLAG_IS_DEFAULT(Shared ##region## Size) ? \ (uintx)(type ## SharedArchiveSize * region ## RegionPercentage) : Shared ## region ## Size class FileMapInfo; + class MetaspaceSharedStats VALUE_OBJ_CLASS_SPEC { + public: + MetaspaceSharedStats() { + memset(this, 0, sizeof(*this)); + } + CompactHashtableStats symbol; + }; + // Class Data Sharing Support class MetaspaceShared : AllStatic { // CDS support static ReservedSpace* _shared_rs; static int _max_alignment; + static MetaspaceSharedStats _stats; static bool _link_classes_made_progress; static bool _check_classes_made_progress; static bool _has_error_classes; static bool _archive_loading_failed; public:
*** 116,125 **** --- 126,139 ---- void** vtable, char** md_top, char* md_end, char** mc_top, char* mc_end); static void serialize(SerializeClosure* sc); + static MetaspaceSharedStats* stats() { + return &_stats; + } + // JVM/TI RedefineClasses() support: // Remap the shared readonly space to shared readwrite, private if // sharing is enabled. Simply returns true if sharing is not enabled // or if the remapping has already been done by a prior call. static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);