hotspot/src/share/vm/memory/metaspaceShared.hpp
changeset 26304 a28e6335ce60
parent 26135 82b516c550f7
child 26408 d6defe172e25
equal deleted inserted replaced
26303:ef9b4c475c1d 26304:a28e6335ce60
    27 #include "memory/allocation.hpp"
    27 #include "memory/allocation.hpp"
    28 #include "memory/memRegion.hpp"
    28 #include "memory/memRegion.hpp"
    29 #include "runtime/virtualspace.hpp"
    29 #include "runtime/virtualspace.hpp"
    30 #include "utilities/exceptions.hpp"
    30 #include "utilities/exceptions.hpp"
    31 #include "utilities/macros.hpp"
    31 #include "utilities/macros.hpp"
       
    32 
       
    33 #define LargeSharedArchiveSize    (300*M)
       
    34 #define HugeSharedArchiveSize     (800*M)
       
    35 #define ReadOnlyRegionPercentage  0.4
       
    36 #define ReadWriteRegionPercentage 0.55
       
    37 #define MiscDataRegionPercentage  0.03
       
    38 #define MiscCodeRegionPercentage  0.02
       
    39 #define LargeThresholdClassCount  5000
       
    40 #define HugeThresholdClassCount   40000
       
    41 
       
    42 #define SET_ESTIMATED_SIZE(type, region)                              \
       
    43   Shared ##region## Size  = FLAG_IS_DEFAULT(Shared ##region## Size) ? \
       
    44     (type ## SharedArchiveSize *  region ## RegionPercentage) : Shared ## region ## Size
    32 
    45 
    33 class FileMapInfo;
    46 class FileMapInfo;
    34 
    47 
    35 // Class Data Sharing Support
    48 // Class Data Sharing Support
    36 class MetaspaceShared : AllStatic {
    49 class MetaspaceShared : AllStatic {
   110 
   123 
   111   static bool try_link_class(InstanceKlass* ik, TRAPS);
   124   static bool try_link_class(InstanceKlass* ik, TRAPS);
   112   static void link_one_shared_class(Klass* obj, TRAPS);
   125   static void link_one_shared_class(Klass* obj, TRAPS);
   113   static void check_one_shared_class(Klass* obj);
   126   static void check_one_shared_class(Klass* obj);
   114   static void link_and_cleanup_shared_classes(TRAPS);
   127   static void link_and_cleanup_shared_classes(TRAPS);
       
   128 
       
   129   static int count_class(const char* classlist_file);
       
   130   static void estimate_regions_size() NOT_CDS_RETURN;
   115 };
   131 };
   116 #endif // SHARE_VM_MEMORY_METASPACE_SHARED_HPP
   132 #endif // SHARE_VM_MEMORY_METASPACE_SHARED_HPP