1.1 --- a/src/share/vm/memory/metaspaceShared.hpp Thu Aug 28 17:05:41 2014 +0200 1.2 +++ b/src/share/vm/memory/metaspaceShared.hpp Mon Aug 25 00:13:36 2014 -0700 1.3 @@ -30,6 +30,19 @@ 1.4 #include "utilities/exceptions.hpp" 1.5 #include "utilities/macros.hpp" 1.6 1.7 +#define LargeSharedArchiveSize (300*M) 1.8 +#define HugeSharedArchiveSize (800*M) 1.9 +#define ReadOnlyRegionPercentage 0.4 1.10 +#define ReadWriteRegionPercentage 0.55 1.11 +#define MiscDataRegionPercentage 0.03 1.12 +#define MiscCodeRegionPercentage 0.02 1.13 +#define LargeThresholdClassCount 5000 1.14 +#define HugeThresholdClassCount 40000 1.15 + 1.16 +#define SET_ESTIMATED_SIZE(type, region) \ 1.17 + Shared ##region## Size = FLAG_IS_DEFAULT(Shared ##region## Size) ? \ 1.18 + (type ## SharedArchiveSize * region ## RegionPercentage) : Shared ## region ## Size 1.19 + 1.20 class FileMapInfo; 1.21 1.22 // Class Data Sharing Support 1.23 @@ -112,5 +125,8 @@ 1.24 static void link_one_shared_class(Klass* obj, TRAPS); 1.25 static void check_one_shared_class(Klass* obj); 1.26 static void link_and_cleanup_shared_classes(TRAPS); 1.27 + 1.28 + static int count_class(const char* classlist_file); 1.29 + static void estimate_regions_size() NOT_CDS_RETURN; 1.30 }; 1.31 #endif // SHARE_VM_MEMORY_METASPACE_SHARED_HPP