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

Afshin Zafari azafari at openjdk.org
Fri Feb 28 13:32:09 UTC 2025


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

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removed UseFlagInPlace test.
>
> src/hotspot/share/nmt/memReporter.cpp line 440:
> 
>> 438:     VirtualMemoryTracker::Instance::tree()->visit_committed_regions(*reserved_rgn,
>> 439:                                                                   [&](CommittedMemoryRegion& committed_rgn) {
>> 440:       if (committed_rgn.size() == reserved_rgn->size() && committed_rgn.call_stack()->equals(*stack)) {
> 
> If we are calling here 
> 
> `equals()`
> 
> anyhow, why not have CommittedMemoryRegion:equals() that checks both the size and the stack? This way we can simply have:
> 
> `if (committed_rgn.equals(reserved_rgn))
> `

Done. But it is used only here.

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

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


More information about the hotspot-dev mailing list