RFR: 8312132: Add tracking of multiple address spaces in NMT [v46]

Thomas Stuefe stuefe at openjdk.org
Thu May 2 14:43:37 UTC 2024


On Thu, 25 Apr 2024 10:27:13 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> src/hotspot/share/nmt/vmatree.hpp line 135:
>> 
>>> 133:   SummaryDiff register_mapping(size_t A, size_t B, StateType state, Metadata& metadata);
>>> 134: 
>>> 135:   SummaryDiff reserve_mapping(size_t from, size_t sz, Metadata& metadata) {
>> 
>> If we use `reserve_mapping` for `uncommit_memory`, we need to set a `StackIndex` and a `MEMFLAGS` to pass as a `Metadata`. If we use `mtNone` for example, all the uncommitted amount would be accounted for `mtNone`.
>> Would you please provide a `uncommit_mapping(address, size)` to handle these issues properly?
>
> Let's wait with this until we actually port over the `VirtualMemoryTracker` to use `VMATree`.

I think we should rethink recording specific stacks for uncommitted memory. I don't believe anyone cares who reserves uncommitted memory; or who uncommits memory. And this only leads to splintering the tree, if we uncommit from different callsites. We should consider keeping stacks for committed memory only, and use some noop stack placeholder for uncommitted mmeory.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1587752880


More information about the hotspot-dev mailing list