RFR: 8263464: NMT: assert in gtest os.release_multi_mappings_vm
Thomas Stuefe
stuefe at openjdk.org
Fri May 5 10:42:16 UTC 2023
On Thu, 4 May 2023 18:57:18 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.
>
> Tested via `Mach5 tier1,tier2,tier3` and locally via `gtest:NMT*:os*`
src/hotspot/share/services/virtualMemoryTracker.cpp line 566:
> 564:
> 565: return true;
> 566: }
- you don't need to carry/calculate remaining. The end pointer, and comparing each region's end with it, should be sufficient.
- Some sort of assert that addresses are monotonously ascending would be assuring
- The last region may not be completely part of the released memory range. See above, lines 534..546. Needs to be treated the same way here. Possibly you can fold both approaches together roughly like this:
while (release range end < current region end) {
release whole region
region = next region
}
// last region may not be fully contained
if (last region not fully contained) {
split region, release lower half
}
test/hotspot/gtest/runtime/test_os.cpp line 465:
> 463: return;
> 464: }
> 465:
Since appearantly it is possible to release part of a range, we need also a test that tests multi-region-release but with the last region only partly covered.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13813#discussion_r1185943080
PR Review Comment: https://git.openjdk.org/jdk/pull/13813#discussion_r1185944172
More information about the hotspot-runtime-dev
mailing list