RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v8]
Gerard Ziemski
gziemski at openjdk.org
Mon Apr 7 16:01:50 UTC 2025
On Mon, 7 Apr 2025 12:37:30 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:
>
> fixes. New check_tree impl and visualization.
I really like the way we now visualize the cases. One thing I'd prefer is to actually have the "pre" and "post" cases spelled out explicitly, which I did (and aligned the visual snapshots where needed)
NIce!
test/hotspot/gtest/nmt/test_vmatree.cpp line 862:
> 860: tree.commit_mapping(25, 25, call_stack_2, true); // commit at the middle of the region
> 861: // Pre: post of previous
> 862: // Post: .........0---------25*********50--------100.........
// Pre: .........0------------------------------100.........
// Post: .........0---------25*********50--------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 876:
> 874: tree.commit_mapping(0, 20, call_stack_2, true); // commit at the begin of the region
> 875: // Pre: post of previous
> 876: // Post: .........0********20---------25********50--------100.........
// Pre: .........0---------------25*********50--------100.........
// Post: .........0********20-----25*********50--------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 890:
> 888: tree.commit_mapping(80, 20, call_stack_2, true); // commit at the end of the region
> 889: // Pre: post of previous
> 890: // Post: .........0********20---------25********50--------80********100.........
// Pre: .........0********20-----25*********50------------------100.........
// Post: .........0********20-----25*********50--------80********100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 920:
> 918: tree.commit_mapping(20, 20, call_stack_2, true);
> 919: // Pre: post of previous
> 920: // Post: .........0---------20********40-------100.........
// Pre: .........0----------------------------100.........
// Post: .........0---------20********40-------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 937:
> 935: tree.commit_mapping(10, 20, call_stack_3);
> 936: // Pre: post of previous
> 937: // Post: .........0---------10********30********40-------100.........
// Pre: .........0---------20**************40-------100.........
// Post: .........0---10*********30*********40-------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 954:
> 952: tree.commit_mapping(30, 20, call_stack_4);
> 953: // Pre: post of previous
> 954: // Post: .........0---------10********30********50-------100.........
// Pre: .........0---------10********30*********40------------------100.........
// Post: .........0---------10********30********************50-------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 975:
> 973:
> 974: tree.uncommit_mapping(0, 5, call_stack_2);
> 975: // Pre: .........0********10--------20********40-------100.........
// Pre: .........0***********10--------20********40-------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 980:
> 978: // - si_1 si_1 si_1 si_1 -
> 979: // - si_2 - si_2 - -
> 980: // Post: .........0--------5********10--------20********40-------100.........
// Post: .........0-----5*****10--------20********40-------100.........
test/hotspot/gtest/nmt/test_vmatree.cpp line 994:
> 992: tree.uncommit_mapping(20, 10, call_stack_2);
> 993: // Pre: post of previous
> 994: // Post: .........0--------5********10--------30********40-------100.........
// Pre: .........0-----5*****10--------20****************40-------100.........
// Post: .........0-----5*****10----------------30********40-------100.........
-------------
Changes requested by gziemski (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24028#pullrequestreview-2747343623
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031552088
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031552929
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031553434
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031554000
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031554533
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031554915
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031555378
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031556001
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031556524
More information about the hotspot-runtime-dev
mailing list