RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v21]
Afshin Zafari
azafari at openjdk.org
Fri Feb 21 10:30:18 UTC 2025
On Mon, 10 Feb 2025 14:03:21 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/memReporter.cpp line 201:
>
>> 199: if (mem_tag == mtThread) {
>> 200: const VirtualMemory* thread_stack_usage =
>> 201: (const VirtualMemory*)_vm_snapshot->by_tag(mtThreadStack);
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/memReporter.cpp line 243:
>
>> 241: } else if (mem_tag == mtThread) {
>> 242: const VirtualMemory* thread_stack_usage =
>> 243: _vm_snapshot->by_tag(mtThreadStack);
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/memReporter.cpp line 810:
>
>> 808: void MemDetailDiffReporter::diff_malloc_sites() const {
>> 809: MallocSiteIterator early_itr = _early_baseline.malloc_sites(MemBaseline::by_site_and_tag);
>> 810: MallocSiteIterator current_itr = _current_baseline.malloc_sites(MemBaseline::by_site_and_tag);
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/memoryFileTracker.cpp line 47:
>
>> 45: VMATree::SummaryDiff diff = file->_tree.commit_mapping(offset, size, regiondata);
>> 46: for (int i = 0; i < mt_number_of_tags; i++) {
>> 47: VirtualMemory* summary = file->_summary.by_tag(NMTUtil::index_to_tag(i));
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/memoryFileTracker.cpp line 56:
>
>> 54: VMATree::SummaryDiff diff = file->_tree.release_mapping(offset, size);
>> 55: for (int i = 0; i < mt_number_of_tags; i++) {
>> 56: VirtualMemory* summary = file->_summary.by_tag(NMTUtil::index_to_tag(i));
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/memoryFileTracker.cpp line 187:
>
>> 185: snap->commit_memory(current->committed());
>> 186: }
>> 187: }
>
> Revert this change
Done.
> src/hotspot/share/nmt/memoryFileTracker.hpp line 81:
>
>> 79: const MemoryFile* file = _files.at(d);
>> 80: for (int i = 0; i < mt_number_of_tags; i++) {
>> 81: f(NMTUtil::index_to_tag(i), file->_summary.by_tag(NMTUtil::index_to_tag(i)));
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/nmtCommon.cpp line 33:
>
>> 31:
>> 32: #define MEMORY_TAG_DECLARE_NAME(tag, human_readable) \
>> 33: { #tag, human_readable },
>
> Move out into mainline PR
Done.
> src/hotspot/share/nmt/nmtCommon.hpp line 91:
>
>> 89: // Map memory tag to index
>> 90: static inline int tag_to_index(MemTag mem_tag) {
>> 91: assert(tag_is_valid(mem_tag), "Invalid tag (%u)", (unsigned)mem_tag);
>
> Move out into mainline PR
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965234821
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965236095
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965237891
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965238649
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965239439
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965240691
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965241348
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965242071
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1965242582
More information about the hotspot-dev
mailing list