RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v2]
Afshin Zafari
azafari at openjdk.org
Tue Mar 18 09:20:59 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.
The cases and their result:
// (address, size, callstack) arguments
// x == invalid stack == not-filled
# Case 1
tree.reserve(0, 100, s1);
tree.commit(25, 25 , s2);
0 25 50 100
-------- -------- -------- --------
in out in out in out in out
x s1 s1 s2 s2 x s1 x
x x x x x x x x
commit is not at start of the region.
# Case 2
tree.reserve(0, 100, s1);
tree.reserve(10, 10, s2);
0 10 20 100
-------- -------- -------- --------
in out in out in out in out
x s1 s1 s2 s2 x s1 x
x x x x x x x x
# Case 3
tree.commit(0, 100, s1);
0 100
-------- --------
in out in out
x s1 s1 x
x x x x
it is not acceptable to committ a region without reserving it.
# Case 4
tree.commit(0, 100, s1);
tree.reserve(0, 100, s2);
0 100
-------- --------
in out in out
x s2 s2 x
x s1 s1 x
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24028#issuecomment-2732247346
More information about the hotspot-runtime-dev
mailing list