Review request: 8024638: Count and expose the amount of committed memory in the metaspaces
stefan.karlsson at oracle.com
Wed Sep 11 14:03:58 PDT 2013
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
On 9/11/13 6:10 PM, Stefan Karlsson wrote:
> 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:
> Changes in the patch:
> - Renamed VirtualSpaceList::_virtual_space_total to
> - 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.
More information about the hotspot-dev