RFR (M): 8138983: Runtime: implement ranges for Shared*** flags
gerard ziemski
gerard.ziemski at oracle.com
Mon Nov 9 18:59:34 UTC 2015
hi David,
Thank you for the review. Please see my answers in-line:
On 11/08/2015 05:26 PM, David Holmes wrote:
> Hi Gerard,
>
> Sorry, I don't like the way all the metaspaceshared internal logistical calculations are now exposed in globals.hpp. Can
> we not keep those calculations internal to the metaspace code and just export the resulting minimum and default values?
I was afraid I would make a circular dependency by putting those defaults in metaspace code, but I forgot that the range
macros get expanded in commandLineFlagRangeList.cpp, and not in the globals.hpp, so this is in fact doable - fixed.
> I'm also unclear where your max values are coming from.
Ah, thank you very much for asking. I hope I got this right - the max values come from the following piece of code in
compacthashtable.cpp, CompactHashtableWriter::dump_backets(), line 139:
assert(max_delta <= 0x7FFFFFFF)
where max_delta is "reserved space" size, which I read to be the max memory that can be reserved to hold ALL of
SharedMiscCode, SharedMiscData, SharedReadOnly and SharedReadWrite sections together. Which is why the individual sizes
of each sections are 0x7FFFFFFF-(total default sizes of the other 3 sections)
Did I get this right?
> On 7/11/2015 7:33 AM, gerard ziemski wrote:
>> hi all,
>>
>> I have updated the fix with rev1, incorporating feedback from Dmitry:
>>
>> - Fix comments and indentation
>> - Add "-XShare:dump" while testing Shared* flags
>
> When dumping during testing you need to specify a specific shared archive file name (-XX:SharedArchiveFile=... IIRC)
> otherwise you will be creating the archive in the location of the JVM under test and potentially impact later tests.
Fixed.
I will work on rev2 after testing shortly.
cheers
> Thanks,
> David
>
>> - Temporarily disable testing of SharedMiscDataSize as with current min
>> default it exits the VM with code 2 (which is allowed by the JEP, but
>> not the test framework). This issue is tracked by JDK-8141650
>>
>> http://cr.openjdk.java.net/~gziemski/8138983_rev1
>>
>>
>>
>> cheers
>>
>>
>>
>> On 11/06/2015 09:58 AM, gerard ziemski wrote:
>>>
>>> hi all,
>>>
>>> Please review this final fix for JEP-245
>>>
>>> We implement the remaining runtime flags in the Shared* family.
>>>
>>> Summary of changes:
>>>
>>> #1 core fix - we factor out the constants to be used in the ranges
>>>
>>> src/share/vm/classfile/compactHashtable.cpp
>>> src/share/vm/memory/metaspace.cpp
>>> src/share/vm/memory/metaspaceShared.hpp
>>> src/share/vm/runtime/globals.hpp
>>>
>>>
>>> #2 we increase default sizes of range and constraint tables to
>>> minimize mallocs
>>>
>>> src/share/vm/runtime/commandLineFlagConstraintList.cpp
>>> src/share/vm/runtime/commandLineFlagRangeList.cpp
>>>
>>>
>>> #3 we fix a bug that I run into the OptionsValidation test framework
>>> while working
>>>
>>> test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/IntJVMOption.java
>>>
>>>
>>>
>>> #4 we add functionality to OptionsValidation test framework that we
>>> later use
>>>
>>> test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
>>>
>>>
>>>
>>> #5 we cleanup and extend the existing test to detect a case where we
>>> get out of range value
>>>
>>> test/runtime/SharedArchiveFile/LimitSharedSizes.java
>>>
>>>
>>> The fix passes RBT
>>> "hotspot/test/:hotspot_all,testlist,noncolo.testlist
>>> --add-tonga-keyword quick” and JPRT “hotspot" tests
>>>
>>> References:
>>>
>>> bug link: https://bugs.openjdk.java.net/browse/JDK-8138983
>>> open webrev: http://cr.openjdk.java.net/~gziemski/8138983_rev0
>>>
>>>
>>> hg_stat:
>>>
>>>
>>> src/share/vm/classfile/compactHashtable.cpp
>>> | 2 +-
>>>
>>> src/share/vm/memory/metaspace.cpp
>>> | 30 --
>>>
>>> src/share/vm/memory/metaspaceShared.hpp
>>> | 19 +-
>>>
>>> src/share/vm/runtime/commandLineFlagConstraintList.cpp
>>> | 2 +-
>>>
>>> src/share/vm/runtime/commandLineFlagRangeList.cpp
>>> | 2 +-
>>>
>>> src/share/vm/runtime/globals.hpp
>>> | 63 +++++-
>>>
>>> test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/IntJVMOption.java
>>> | 4 +-
>>>
>>> test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
>>> | 81 +++++++
>>>
>>> test/runtime/SharedArchiveFile/LimitSharedSizes.java
>>> | 180 +++++++++-------
>>> 9 files changed, 242 insertions(+), 141 deletions(-)
>
More information about the hotspot-dev
mailing list