RFR: 8263464: NMT: assert in gtest os.release_multi_mappings_vm [v4]
Thomas Stuefe
stuefe at openjdk.org
Mon May 15 17:13:51 UTC 2023
On Mon, 15 May 2023 16:36:14 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> This fix allows NMT to account for released memory that was allocated in chunks, as long as the final pointer and size refer to total contiguous regions of the requested size.
>>
>> The main idea here is to iterate over the "synthetic" region that was given to us and split it up into the underlaying existing regions, and then recursively handle them one at a time as we normally do.
>>
>> Tested via `Mach5 tier1,tier2,tier3` and locally via `gtest:NMT*:os*`
>
> Gerard Ziemski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge remote-tracking branch 'upstream/master' into JDK-8263464
> - add support for more cases of partial regions, make test more flexible, add more tests
> - support partial release, add corresponding test
> - release memory reserved using multiple region allocations
src/hotspot/share/services/virtualMemoryTracker.cpp line 563:
> 561:
> 562: // Allow for the segment to be partially released
> 563: long offset = remove_rgn->base() - addr;
Just a fly-by (no time to look at this closer, sorry): long is incorrect for Windows (LLP64). ptrdiff_t is better but has a number of caveats. hotspot usually uses pointer_delta(), with a preceding test for order.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13813#discussion_r1194112976
More information about the hotspot-runtime-dev
mailing list