RFR: 8324829: Uniform use of synchronizations in NMT
Afshin Zafari
azafari at openjdk.org
Tue Feb 27 09:14:43 UTC 2024
On Mon, 26 Feb 2024 14:47:26 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> Could we rename VirtualMemoryTracker::remove_uncommitted_region to something else (e.g. VirtualMemoryTracker::remove_committed_region or VirtualMemoryTracker::uncommit_region)? I always start wondering when reading this function name, since we don't remove an uncommitted region, we uncommit a region resp. remove a committed region.
The `VirtualMemoryTracker` (VMT) API is used internally by the NMT itself. The `MemTracker` API are the ones used by other hotspot code. The *remove* in `VirtualMemoryTracking::remove_uncommitted_region` refers to editing of the linked list and not referring to the memory operations. When we uncommit a region we call `MemTracker::record_virtual_memory_uncommit` for recording that in NMT which is meaningful and correct. VMT APIs are not called/used by non-NMT hotspot code.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18000#issuecomment-1966096901
More information about the hotspot-dev
mailing list