RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v2]
Gerard Ziemski
gziemski at openjdk.org
Thu Mar 13 16:22:58 UTC 2025
On Thu, 13 Mar 2025 13:13: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 bug.
Changes requested by gziemski (Reviewer).
src/hotspot/share/nmt/vmatree.cpp line 100:
> 98: stB.in.set_stack(leqA_n->val().out.stack());
> 99: stA.out.set_second_stack(metadata.stack_idx);
> 100: stB.in.set_second_stack(metadata.stack_idx);
Did we consider naming them differently?
One obvious choice would be ReserveStack and CommitStack?
Right now, we need to mentally map them one way, and I am afraid that we could possibly get it reversed at some other point in code...
-------------
PR Review: https://git.openjdk.org/jdk/pull/24028#pullrequestreview-2682612623
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r1993880091
More information about the hotspot-runtime-dev
mailing list