Review request: 8024638: Count and expose the amount of committed memory in the metaspaces
Stefan Karlsson
stefan.karlsson at oracle.com
Thu Sep 12 03:37:22 PDT 2013
On 09/12/2013 10:11 AM, Bengt Rutisson wrote:
>
> Stefan,
>
> Looks good.
Thanks, Bengt.
StefanK
>
> For the record, Stefan and I talked about introducing some
> verification code to check that the reserved and committed sizes that
> the VirtualSpaceList keeps track of is the same as the sum of the
> corresponding values for all nodes. We agreed to add that as a
> separate change.
>
> Thanks,
> Bengt
>
> On 9/11/13 11:03 PM, Stefan Karlsson wrote:
>> http://cr.openjdk.java.net/~stefank/8024547/webrev.01/
>>
>> Further testing showed that one of the asserts in
>> actual_committed_size was incorrect when the the middle region of the
>> VirtualSpace was empty and the middle alignment was larger than the
>> other alignments. This can happen when large pages are used and the
>> size of the VirtualSpace is within the range [large_page_size, 2 *
>> large_page_size).
>>
>> I rewrote the asserts to handle that and similar cases. I also added
>> new unit test cases that provoked this incorrect assert.
>>
>> Thanks Erik Helin for finding this (and also for helping out with the
>> original patch).
>>
>> thanks,
>> StefanK
>>
>> On 9/11/13 6:10 PM, Stefan Karlsson wrote:
>>> http://cr.openjdk.java.net/~stefank/8024547/webrev.00/
>>>
>>> This change adds code to track the committed memory in the metaspaces.
>>>
>>> This fix is a prerequisite for:
>>> 8024547: MaxMetaspaceSize should limit the committed memory used
>>> by the metaspaces
>>>
>>> The patch is built upon this change, which is also out for review:
>>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-September/010766.html
>>>
>>>
>>> Changes in the patch:
>>>
>>> - Renamed VirtualSpaceList::_virtual_space_total to
>>> VirtualSpaceList::_reserved_words.
>>>
>>> - Introduced a VirtualSpaceList::_committed_words.
>>>
>>> - Added a new function VirtualSpace::actual_committed_size(), which
>>> reports the memory committed by the OS. The per-existing function
>>> VirtualSpace::committed_size() only reports the amount of memory
>>> asked for by calls to VirtualSpace::expand_by, which can be
>>> significantly less because of OS allocation granularities and large
>>> pages.
>>>
>>> - Added code to tracks when the VirtualSpaces in the
>>> VirtualSpaceNodes are created, deleted, and expanded.
>>>
>>> - Added unit tests.
>>>
>>> thanks,
>>> StefanK
>>
>
More information about the hotspot-dev
mailing list