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

Afshin Zafari azafari at openjdk.org
Tue Feb 25 11:06:27 UTC 2025


On Mon, 24 Feb 2025 08:24:06 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   once more.
>
> src/hotspot/share/nmt/memoryFileTracker.cpp line 183:
> 
>> 181:     // Only account the committed memory.
>> 182:     snap->commit_memory(current->committed());
>> 183:   });}
> 
> Style: Restore to what it was before.

Done.

> src/hotspot/share/nmt/virtualMemoryTracker.hpp line 404:
> 
>> 402:     friend class VirtualMemoryTrackerTest;
>> 403:     friend class CommittedVirtualMemoryTest;
>> 404: 
> 
> These two classes doesn't exist anymore.

The first got back to life. The second is removed.

> src/hotspot/share/nmt/vmatree.cpp line 80:
> 
>> 78:       MemTag tag = leqA_n->val().out.mem_tag();
>> 79:       stA.out.set_tag(tag);
>> 80:       LEQ_A.state.out.set_tag(tag);
> 
> This also seems like a bug fix that must be separated out into a separate PR along with test cases.

Moved to this PR: 
https://github.com/openjdk/jdk/pull/23771

> src/hotspot/share/nmt/vmatree.cpp line 211:
> 
>> 209:   // Finally, we can register the new region [A, B)'s summary data.
>> 210:   MemTag tag_to_change = use_tag_inplace ? stA.out.mem_tag() : metadata.mem_tag;
>> 211:   SingleDiff& rescom = diff.tag[NMTUtil::tag_to_index(tag_to_change)];
> 
> This seems to be a bug fix to 8335091. You should open a separate mainline PR with this fix and add a testcase for it. Your fix should be integrated before this PR is.

Moved to this PR: https://github.com/openjdk/jdk/pull/23771

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1969542371
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1969543273
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1969538538
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1969539202


More information about the hotspot-dev mailing list