RFR: 8353444: NMT: rename 'category' to 'MemTag' in malloc tracker [v5]
Afshin Zafari
azafari at openjdk.org
Wed Aug 13 11:20:03 UTC 2025
On Tue, 12 Aug 2025 15:07:23 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/master' into _8353444_mem_category_to_memtag
>> - copyright fixed
>> - Merge remote-tracking branch 'origin/master' into _8353444_mem_category_to_memtag
>> - fixed a missed test.
>> - user-facing terms remained as 'category'
>> - 8353444: NMT: rename 'category' to 'MemTag' in malloc tracker
>
> src/hotspot/share/nmt/mallocLimit.hpp line 57:
>
>> 55:
>> 56: void set_global_limit(size_t s, MallocLimitMode type);
>> 57: void set_mem_tag_limit(MemTag mem_tag, size_t s, MallocLimitMode mode);
>
> Prefer the old names.
Done.
> src/hotspot/share/nmt/mallocTracker.cpp line 131:
>
>> 129: }
>> 130:
>> 131: bool MallocMemorySummary::mem_tag_limit_reached(MemTag mem_tag, size_t s, size_t so_far, const malloclimit* limit) {
>
> I think I prefer the old name of this API.
Done.
> src/hotspot/share/nmt/mallocTracker.hpp line 216:
>
>> 214: // Called when a total limit break was detected.
>> 215: // Will return true if the limit was handled, false if it was ignored.
>> 216: static bool mem_tag_limit_reached(MemTag mem_tag, size_t s, size_t so_far, const malloclimit* limit);
>
> I think I prefer the old name of this API.
Done.
> src/hotspot/share/nmt/mallocTracker.hpp line 258:
>
>> 256:
>> 257: // MallocLimit: returns true if allocating s bytes on f would trigger
>> 258: // either global or the MemTag limit
>
> No need to change the comment?
Done.
> src/hotspot/share/nmt/mallocTracker.inline.hpp line 34:
>
>> 32: #include "utilities/globalDefinitions.hpp"
>> 33:
>> 34: // Returns true if allocating s bytes on f would trigger either global or the MemTag limit
>
> No need to change the comment?
Done
> test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp line 79:
>
>> 77: }
>> 78:
>> 79: TEST(NMT, MallocLimitPerMemTag) {
>
> Prefer the old name.
Done.
> test/hotspot/gtest/nmt/test_nmt_totals.cpp line 92:
>
>> 90: // spread over mem-tags
>> 91: int mtag = i % (mt_number_of_tags - 1);
>> 92: p[i] = NEW_C_HEAP_ARRAY(char, ALLOC_SIZE, (MemTag)mtag);
>
> Prefer the old names.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273038258
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273035083
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273035510
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273036187
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273036793
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273037263
PR Review Comment: https://git.openjdk.org/jdk/pull/25226#discussion_r2273037668
More information about the hotspot-runtime-dev
mailing list