Review request: 8024638: Count and expose the amount of committed memory in the metaspaces
Stefan Karlsson
stefan.karlsson at oracle.com
Wed Sep 11 14:03:58 PDT 2013
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