RFR (M): 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing
gerard ziemski
gerard.ziemski at oracle.com
Wed Sep 30 17:57:41 UTC 2015
Ah, thank you Jiangli for the note! I will try to reconcile the range values with the ones you just pointed out.
cheers
On 09/30/2015 12:44 PM, Jiangli Zhou wrote:
> Hi Gerard,
>
>>
>>
>>> I think it would be good to have definitions of
>>> DEFAULT_SHARED_READ_WRITE_SIZE = *NOT_LP64(12*M) LP64_ONLY(16*M),* or as
>>> constant values above in the file and have the ranges be min = default -
>>> 1M and max = default + 1M or something like that.
>>
>> I like the approach, but how about we widen up the ranges a bit like so:
>>
>> #define DEFAULT_SHARED_READ_WRITE_SIZE (NOT_LP64(12*M) LP64_ONLY(16*M))
>> #define MIN_SHARED_READ_WRITE_SIZE (DEFAULT_SHARED_READ_WRITE_SIZE/32)
>> #define MAX_SHARED_READ_WRITE_SIZE (DEFAULT_SHARED_READ_WRITE_SIZE*32)
>>
>> #define DEFAULT_SHARED_READ_ONLY_SIZE (NOT_LP64(12*M) LP64_ONLY(16*M))
>> #define MIN_SHARED_READ_ONLY_SIZE (DEFAULT_SHARED_READ_ONLY_SIZE/32)
>> #define MAX_SHARED_READ_ONLY_SIZE (DEFAULT_SHARED_READ_ONLY_SIZE*32)
>>
>> #define DEFAULT_SHARED_MISC_DATA_SIZE (NOT_LP64(2*M) LP64_ONLY(4*M))
>> #define MIN_SHARED_MISC_DATA_SIZE (DEFAULT_SHARED_MISC_DATA_SIZE/16)
>> #define MAX_SHARED_MISC_DATA_SIZE (DEFAULT_SHARED_MISC_DATA_SIZE*16)
>>
>> #define DEFAULT_SHARED_MISC_CODE_SIZE (120*K)
>> #define MIN_SHARED_MISC_CODE_SIZE (DEFAULT_SHARED_MISC_CODE_SIZE/8)
>> #define MAX_SHARED_MISC_CODE_SIZE (DEFAULT_SHARED_MISC_CODE_SIZE*8)
>>
>
> I like the idea of well defined DEFAULT, MIN, and MAX values in a central place. The
> src/share/vm/memory/metaspaceShared.hpp defines the min values of the shared RO/RW space size. Please make sure the min
> values are not smaller that those. The Metaspace::global_initialize() (in src/share/vm/memory/metaspace.cpp) calculates
> the min shared_misc_data and shared_misc_code sizes based on vtable methods. It might not be a good idea to use a static
> value for those. For the max values of the shared space size, we don’t want to be too restrict as user can specify large
> number of classes for archiving. The resulting usage of the shared spaces are much larger than the default sizes.
>
> Thanks,
> Jiangli
More information about the hotspot-runtime-dev
mailing list