RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v29]

Gerard Ziemski gziemski at openjdk.org
Wed May 21 22:31:58 UTC 2025


On Wed, 21 May 2025 10:15:15 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> In NMT detail mode, we need to have separate call-stacks for Reserve and Commit operations.
>> This PR adds a second stack to every node that will be used when committing (and uncommitting) the start node of a reserved region.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed a missed change in test.

Changes requested by gziemski (Reviewer).

test/hotspot/gtest/nmt/test_vmatree.cpp line 318:

> 316:   Tree tree;
> 317:   VMATree::RegionData rd1(si[0], mtTest);
> 318:   VMATree::RegionData rd2(si[1], mtNone);

We keep using those later in and it is hard to keep track of what `rd1` is. I suggest we use better names for those, such as `rd_Test`, then I know what mem_tag that region uses without having to go back.

I renamed other instances, like `call_stack_2` as well.

I have changed lots of those and here is a diff file with this change: [gerard.diff.zip](https://github.com/user-attachments/files/20376150/gerard.diff.zip)

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

PR Review: https://git.openjdk.org/jdk/pull/24028#pullrequestreview-2859278402
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2101279884


More information about the hotspot-runtime-dev mailing list