RFR: 8304442: Allocate VirtualMemoryTracker into Arena

Johan Sjölen jsjolen at openjdk.org
Tue Mar 28 08:54:32 UTC 2023


On Mon, 27 Mar 2023 17:49:30 GMT, Coleen Phillimore <coleenp 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.
>
> 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).

`mtNone` just signifies that the `_flag` is unused in this case (it's also pre-existing).'

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13190#discussion_r1150251286


More information about the hotspot-runtime-dev mailing list