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

Afshin Zafari azafari at openjdk.org
Thu Feb 27 21:04:13 UTC 2025


On Thu, 27 Feb 2025 17:50:25 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> src/hotspot/share/nmt/memTracker.hpp line 60:
>> 
>>> 58:   static bool walk_virtual_memory(VirtualMemoryWalker* walker) {
>>> 59:     return VirtualMemoryTracker::Instance::walk_virtual_memory(walker);
>>> 60:   }
>> 
>> The `MemTracker` API exposes the outer and locking implementation to the rest of Hotspot. These two methods are used by us internally. I think it's better if these methods are deleted and the `VirtualMemoryTracker::Instance` methods are called directly, instead.
>
> Not sure I agree with Johan's comment here - in memBaseline.cpp we use MemTracker a lot, so adding these APIs make sense there, otherwise we would have to split work between MemTracker and VirtualMemoryTracker.
> 
> Personally I like this way better.

Done.

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

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


More information about the hotspot-dev mailing list