RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v3]
Robert Toyonaga
duke at openjdk.org
Thu Nov 21 20:42:27 UTC 2024
On Mon, 11 Nov 2024 11:55:12 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> - `VMATree` is used instead of `SortedLinkList` in new class `VirtualMemoryTrackerWithTree`.
>> - A wrapper/helper `RegionTree` is made around VMATree to make some calls easier.
>> - Both old and new versions exist in the code and can be selected via `MemTracker::set_version()`
>> - `find_reserved_region()` is used in 4 cases, it will be removed in further PRs.
>> - All tier1 tests pass except one ~that expects a 50% increase in committed memory but it does not happen~ https://bugs.openjdk.org/browse/JDK-8335167.
>> - Adding a runtime flag for selecting the old or new version can be added later.
>> - Some performance tests are added for new version, VMATree and Treap, to show the idea and should be improved later. Based on the results of comparing speed of VMATree and VMT, VMATree shows ~40x faster response time.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>
> gc/x directory removed.
src/hotspot/share/nmt/regionsTree.hpp line 33:
> 31:
> 32: // RegionsTree extends VMATree to add some more specific API and also defines a helper
> 33: // for processing the tree nodes in a shorter and more menaingful way.
Typo: "meaningful"
src/hotspot/share/nmt/vmtCommon.cpp line 121:
> 119: size_t aligned_stack_size = align_up(stack_size, os::vm_page_size());
> 120:
> 121: ReservedMemoryRegion* region = const_cast<ReservedMemoryRegion*>(rgn);
Is this still needed now that you're directly adding committed regions to the tree? I think this was only there before because it was adding committed regions to the `ReservedMemoryRegion`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1852857478
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1852855336
More information about the hotspot-runtime-dev
mailing list