RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v20]
Johan Sjölen
jsjolen at openjdk.org
Tue Feb 4 13:53:26 UTC 2025
On Thu, 30 Jan 2025 12:55:35 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:
>
> fix in shendoahCardTable
Some issues found from misses made during merging.
test/hotspot/gtest/nmt/test_vmatree.cpp line 831:
> 829: tty->cr();
> 830: }
> 831: }
This looks like a test which was added when you merged in an earlier version of https://github.com/openjdk/jdk/pull/20994
This should be removed.
test/hotspot/jtreg/compiler/stringopts/TestFluidAndNonFluid.java line 1:
> 1: /*
Incorrect merge resolution.
test/hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java line 325:
> 323: output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
> 324: + Long.toHexString(addr + size)
> 325: + "\\] committed " + sizeString);
Not sure why this is changed.
test/hotspot/jtreg/runtime/Thread/TestAlwaysPreTouchStacks.java line 182:
> 180: throw new RuntimeException("Expected a higher delta between stack committed of with and without pretouch." +
> 181: "Expected: " + expected_delta + " Actual: " + actual_delta);
> 182: }
Is this meant to be part of this PR?
test/micro/org/openjdk/bench/vm/compiler/FluidSBBench.java line 1:
> 1: /*
This must be the result of an incorrect merge conflict resolution. It should be deleted.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20425#pullrequestreview-2550042933
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1941207799
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1941201897
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1941199974
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1941201150
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1941198899
More information about the hotspot-dev
mailing list