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

Afshin Zafari azafari at openjdk.org
Fri Feb 21 10:21:09 UTC 2025


On Mon, 10 Feb 2025 14:05:37 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:
>> 
>>   fixed merge problems
>
> src/hotspot/share/nmt/mallocTracker.hpp line 163:
> 
>> 161:   }
>> 162: 
>> 163:   inline const MallocMemory* by_tag(MemTag mem_tag) const {
> 
> Move out into mainline PR

Done

> src/hotspot/share/nmt/mallocTracker.hpp line 241:
> 
>> 239: 
>> 240:    static inline void record_arena_size_change(ssize_t size, MemTag mem_tag) {
>> 241:      as_snapshot()->by_tag(mem_tag)->record_arena_size_change(size);
> 
> Move out into mainline PR

Done.

> src/hotspot/share/nmt/mallocTracker.inline.hpp line 55:
> 
>> 53:       l = MallocLimitHandler::category_limit(mem_tag);
>> 54:       if (l->sz > 0) {
>> 55:         const MallocMemory* mm = as_snapshot()->by_tag(mem_tag);
> 
> Move out into mainline PR

Done.

> src/hotspot/share/nmt/memBaseline.cpp line 64:
> 
>> 62: 
>> 63: // Sort into allocation site addresses and memory tag order for baseline comparison
>> 64: int compare_malloc_site_and_tag(const MallocSite& s1, const MallocSite& s2) {
> 
> Move out into mainline PR

Done

> src/hotspot/share/nmt/memBaseline.cpp line 235:
> 
>> 233:       break;
>> 234:     case by_site_and_tag:
>> 235:       malloc_sites_to_allocation_site_and_tag_order();
> 
> Move out into mainline PR

Done.

> src/hotspot/share/nmt/memBaseline.cpp line 275:
> 
>> 273: 
>> 274: void MemBaseline::malloc_sites_to_allocation_site_order() {
>> 275:   if (_malloc_sites_order != by_site && _malloc_sites_order != by_site_and_tag) {
> 
> Move out into mainline PR

Done.

> src/hotspot/share/nmt/memBaseline.cpp line 292:
> 
>> 290:     _malloc_sites.set_head(tmp.head());
>> 291:     tmp.set_head(nullptr);
>> 292:     _malloc_sites_order = by_site_and_tag;
> 
> Move out into mainline PR

Done

> src/hotspot/share/nmt/memBaseline.hpp line 56:
> 
>> 54:     by_size,         // by memory size
>> 55:     by_site,         // by call site where the memory is allocated from
>> 56:     by_site_and_tag // by call site and memory tag
> 
> Move out into mainline PR (and indentation of comment seems wrong)

Done.

> src/hotspot/share/nmt/memBaseline.hpp line 154:
> 
>> 152:   VirtualMemory* virtual_memory(MemTag mem_tag) {
>> 153:     assert(baseline_type() != Not_baselined, "Not yet baselined");
>> 154:     return _virtual_memory_snapshot.by_tag(mem_tag);
> 
> Move out into mainline PR

Done.

> src/hotspot/share/nmt/memBaseline.hpp line 207:
> 
>> 205:   void malloc_sites_to_allocation_site_order();
>> 206:   // Sort allocation sites in call site address and memory tag order
>> 207:   void malloc_sites_to_allocation_site_and_tag_order();
> 
> Move out into mainline PR

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965223803
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965222796
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965224620
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965225380
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965226658
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965227704
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965228209
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965229789
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965229277
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965228847


More information about the hotspot-dev mailing list