RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v32]

Gerard Ziemski gziemski at openjdk.org
Fri Feb 28 19:54:08 UTC 2025


On Fri, 28 Feb 2025 13:15:29 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> The wordiness is a bit annoying. The reason that we do this is to separate the global static instance from the implementation, so that we can have many `VMT`s when testing (this is very useful). Do you have a concrete way we can refactor this such that we retain the possibility of having many VMTs and one static instance, whilst reducing the wordiness when using the code? Can this refactoring wait until after integration, as we have more classes following the same pattern that'd need to be refactored?
>
> The `HeapReserver` and `MemoryFileTracker` classes (in different parts of the code and different PRs) also use the same syntax for it. Here the same style is used to keep similarity in Hotspot code.

Right, I didn't like it before, and spoke out against it, and now it is spreading :-)

Why do we want to have more than one VMT? If we truly do, then I'm not sure there is anything that could be done here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1975940036


More information about the hotspot-dev mailing list