RFR: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg [v3]
Johan Sjölen
jsjolen at openjdk.org
Sun Jul 28 08:22:34 UTC 2024
On Fri, 26 Jul 2024 17:36:04 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> test/hotspot/gtest/nmt/test_vmatree.cpp line 178:
>>
>>> 176:
>>> 177: tree.reserve_mapping(0, 100, rd1);
>>> 178: tree.commit_mapping(20, 50, rd2, true); // mtTest flag is to be copied to new nodes, even if it is given as mtNMT.
>>
>> When does this happen, that we reserve an overlapping region with a different NMT flag?
>
> Here in this test, I used a different flag to verify that the new flag is not used for the new nodes of the tree. This is testing even if a flag is given but the arg is true, it will be ignored.
> When does this happen, that we reserve an overlapping region with a different NMT flag?
Uncommitting is essentially the same as reserving. We don't do this in the codebase right now, because that'd make NMT crash, but there's nothing weird about the pattern itself.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20330#discussion_r1694171646
More information about the hotspot-runtime-dev
mailing list