RFR: 8350566: NMT: add size parameter to MemTracker::record_virtual_memory_tag [v2]

Gerard Ziemski gziemski at openjdk.org
Thu Mar 6 15:27:04 UTC 2025


On Thu, 6 Mar 2025 14:22:38 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> With the `size` parameter there will be no need to traverse/go through the nodes between the base and end of the region.
>> Tests:
>> linux-x64-debug, gtest:NMT* and runtime/NMT*
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   ReservedSpace is accepted as param.

LGTM, thank you for fixing this.

Need to fix the build errors:

/home/runner/work/jdk/jdk/src/hotspot/share/nmt/memTracker.hpp:224:31: error: invalid use of incomplete type ‘const class ReservedSpace’
  224 |     record_virtual_memory_tag(rs.base(), rs.size(), mem_tag);
      |                               ^~
In file included from /home/runner/work/jdk/jdk/src/hotspot/share/memory/allocation.cpp:28:
/home/runner/work/jdk/jdk/src/hotspot/share/memory/metaspace.hpp:38:7: note: forward declaration of ‘class ReservedSpace’
   38 | class ReservedSpace;
      |       ^~~~~~~~~~~~~
In file included from /home/runner/work/jdk/jdk/src/hotspot/share/memory/allocation.cpp:30:
/home/runner/work/jdk/jdk/src/hotspot/share/nmt/memTracker.hpp:224:42: error: invalid use of incomplete type ‘const class ReservedSpace’
  224 |     record_virtual_memory_tag(rs.base(), rs.size(), mem_tag);
      |                                          ^~
In file included from /home/runner/work/jdk/jdk/src/hotspot/share/memory/allocation.cpp:28:
/home/runner/work/jdk/jdk/src/hotspot/share/memory/metaspace.hpp:38:7: note: forward declaration of ‘class ReservedSpace’
   ... (rest of output omitted)

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

Marked as reviewed by gziemski (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23770#pullrequestreview-2664792545
PR Comment: https://git.openjdk.org/jdk/pull/23770#issuecomment-2704168962


More information about the shenandoah-dev mailing list