RFR: 8366241: NMT: Consolidate [Virtual/Committed/Reserved]Regions into one structure [v4]
Johan Sjölen
jsjolen at openjdk.org
Mon Sep 29 16:43:45 UTC 2025
On Mon, 29 Sep 2025 09:37:44 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> The structures `CommittedMemoryRegion` and `ReservedMemoryRegion` are merged into the `VirtualMemoryRegion`.
>>
>> Tests:
>> tiers1-5, main platforms, debug/product
>
> Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>
> - Merge remote-tracking branch 'origin/master' into _8366241_nmt_consolidate_structures
> - Merge remote-tracking branch 'origin/master' into _8366241_nmt_consolidate_structures
> - master merge fix
> - Merge remote-tracking branch 'origin/master' into _8366241_nmt_consolidate_structures
> - after merge with 8366363.
> - Merge remote-tracking branch 'origin/master' into _8366241_nmt_consolidate_structures
> - 8366241: NMT: Consolidate [Virtual/Committed/Reserved]Regions into one structure
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 196:
> 194: */
> 195: class VirtualMemoryRegion {
> 196: private:
Style, pre-existing: Remove this private as it's private by default at the start.
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 200:
> 198: size_t _size;
> 199: MemTag _mem_tag;
> 200: NativeCallStack _reserved_stack, _committed_stack;
Style: Please separate out these into two declarations on two lines.
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 236:
> 234:
> 235: inline bool contain_address(address addr) const {
> 236: assert(is_valid(), "snaity");
"sanity"
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 244:
> 242: assert(sz > 0, "Invalid size");
> 243: assert(size() > 0, "Invalid size");
> 244: assert(is_valid(), "snaity");
"sanity"
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 265:
> 263: inline bool equals(const VirtualMemoryRegion& rgn) const {
> 264: return compare(rgn) == 0;
> 265: }
Is this used?
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 273:
> 271: bool is_valid() const { return base() != nullptr && size() != 0;}
> 272:
> 273: inline void set_reserved_call_stack(const NativeCallStack& stack) { _reserved_stack = stack; }
Is this used? Doesn't it make more sense for these values to be constant and the VMR to be an immutable object (in essence).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388569129
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388582133
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388570928
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388571464
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388573486
PR Review Comment: https://git.openjdk.org/jdk/pull/27137#discussion_r2388575968
More information about the hotspot-runtime-dev
mailing list