RFR: 8304442: Allocate VirtualMemoryTracker into Arena

Johan Sjölen jsjolen at openjdk.org
Mon Apr 17 09:49:44 UTC 2023


On Mon, 27 Mar 2023 11:24:38 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi,
> 
> This is a suggestion to allocate the VirtualMemoryTracker memory inside of an Arena instead of on the heap. This reduces the number of NativeCallStacks allocated as VMT doesn't go through os::malloc for each linked list node. It also hopefully increases memory locality, as the nodes are in the best case allocated very close to each other.
> 
> This PR sees a performance improvement in os::commit_memory and reserve_memory of about 10-25%, at no cost to reporting.

Hi!

Sorry for the late response, I've been busy with a lot of other things. There's no confusion on Thomas's or Coleen's part, it's me who was confused and forgot the specific semantics of `Arena` unfortunately :). This PR does indeed leak memory, because of Arena's inability to free part-of-a-chunk. I hope I didn't waste your time too much on this! I'll close this, as it's clearly not a sound PR.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13190#issuecomment-1511031053


More information about the hotspot-runtime-dev mailing list