RFR: 8340103: Add internal set_flag function to VMATree [v5]
Afshin Zafari
azafari at openjdk.org
Wed Sep 18 10:20:08 UTC 2024
On Wed, 18 Sep 2024 09:23:39 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Hi!
>>
>> The old VirtualMemoryTracker has a method set_reserved_region_type(address, flag). We implement this for the new VMATree implementation by altering the signature slightly to set_reserved_region_type(address, size, flag). This simplifies the implementation greatly for our new data structure and leads to trivial changes for the callers (all callers already know the size).
>>
>> This PR implements the internal implementation along with tests, but does not change any callers.
>>
>> I also do a few cleanups:
>>
>> - Change `Node` to `TreeNode` in tests, we've seen build failures because of this (probably a precompiled headers issue)
>> - Add a few `print_on` methods for easy debugging
>> - Add a `size` alias, it was a bit confusing that some functions took an argument `position sz`, so changed that to `size sz`
>>
>> Thanks.
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>
> Hopefully this is it
src/hotspot/share/nmt/vmatree.cpp line 214:
> 212: VMATreap::Range range = _tree.find_enclosing_range(from);
> 213: assert(range.start != nullptr && range.end != nullptr,
> 214: "Setting a flag must be done within existing range");
flag --> tag
src/hotspot/share/nmt/vmatree.cpp line 223:
> 221: from = end;
> 222:
> 223: // If end < from + sz then there are multiple ranges for which to set the flag.
flag --> tag
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20994#discussion_r1764796938
PR Review Comment: https://git.openjdk.org/jdk/pull/20994#discussion_r1764797250
More information about the hotspot-runtime-dev
mailing list