RFR: 8304442: Allocate VirtualMemoryTracker into Arena
Coleen Phillimore
coleenp at openjdk.org
Mon Mar 27 17:58:16 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.
These sorted regions are never deleted?
src/hotspot/share/services/virtualMemoryTracker.cpp line 120:
> 118: VirtualMemoryRegion(base, size),
> 119: _committed_regions(VirtualMemoryTracker::_backing_arena),
> 120: _stack(NativeCallStack::empty_stack()), _flag(mtNone) { }
You shouldn't record anything with mtNone (not sure if this is what this does).
src/hotspot/share/services/virtualMemoryTracker.cpp line 127:
> 125: _committed_regions(VirtualMemoryTracker::_backing_arena) {
> 126: *this = rr;
> 127: }
(preexisting) since you have a copy constructor, should you have a deleted operator=?
-------------
PR Review: https://git.openjdk.org/jdk/pull/13190#pullrequestreview-1359587493
PR Review Comment: https://git.openjdk.org/jdk/pull/13190#discussion_r1149602431
PR Review Comment: https://git.openjdk.org/jdk/pull/13190#discussion_r1149602739
More information about the hotspot-runtime-dev
mailing list