RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v18]
Robert Toyonaga
duke at openjdk.org
Wed Jan 29 16:59:59 UTC 2025
On Wed, 29 Jan 2025 08:16:11 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:
>
> merge with the new lock mechanism for NMT
src/hotspot/os/windows/os_windows.cpp line 3642:
> 3640: log_warning(os)("bad release: [" PTR_FORMAT "-" PTR_FORMAT "): %s", p2i(start), p2i(end), err);
> 3641: #ifdef ASSERT
> 3642: os::print_memory_mappings((char*)start, bytes, tty);
I think this will cause lock rank conflicts if you leave it in. Please see [here](https://github.com/openjdk/jdk/pull/22745#discussion_r1890345578) and [here](https://github.com/openjdk/jdk/pull/22745#discussion_r1894197615) for more context.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1934257490
More information about the hotspot-dev
mailing list