RFR: 8340103: Add internal set_flag function to VMATree [v17]

Thomas Stuefe stuefe at openjdk.org
Thu Nov 7 12:41:46 UTC 2024


On Wed, 6 Nov 2024 10:29:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Use size type and size argument name uniformly
>>  - Avoid style discussion by adopting an already accepted style :D
>
> Tests: very nice. Comments inline.

> @tstuefe , alright I've cleaned up a bit and fixed the tests. For address holes, the solution is to skip released ranges. I think I want another test for that case, so I'll make sure to get that up. Other than that, the code is pretty good. I guess I could write a small explanation of the algorithm used in `set_tag`, if you find it unintuitive?

Not an explanation of the algorithm (although you can if you like) but an explanation of the expected behavior above the method in the header.

"Given an NMT tag and a memory range, changes the tag associated with that memory range. The memory range start and end do not have to point at existing section boundaries (setting tags for just parts of existing sections is valid). The memory range may overlap multiple existing sections, but sections in Released state are ignored (Released sections are always tagged with mtNone). This operation may cause existing sections to coalesce or new sections to form".

Then maybe two or three examples of coalescing and splitting.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20994#issuecomment-2462136359


More information about the hotspot-runtime-dev mailing list