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

Gerard Ziemski gziemski at openjdk.org
Tue May 20 21:47:55 UTC 2025


On Thu, 15 May 2025 09:31:13 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:
> 
>   impl of new visualization in one test case, for getting feedback.

hi Afshin,

When I run the updated code using `make test TEST="gtest:NMTVMATreeTest" MICRO="RESULTS_FORMAT=json" TEST_VM_OPTS="-XX:NativeMemoryTracking=detail"` I get these failures:


test/hotspot/gtest/nmt/test_vmatree.cpp:905: Failure
Expected equality of these values:
  td.reserve
    Which is: 0
  sd.reserve
    Which is: -7024640

test/hotspot/gtest/nmt/test_vmatree.cpp:220: Failure
Expected equality of these values:
  diff.tag[from].reserve
    Which is: 0
  upd.reserve[0]
    Which is: -100
Ex. State: 1, op: 2, use-tag:0, from==to: 0

test/hotspot/gtest/nmt/test_vmatree.cpp:222: Failure
Expected equality of these values:
  diff.tag[to].reserve
    Which is: 0
  upd.reserve[1]
    Which is: 100
Ex. State: 1, op: 2, use-tag:0, from==to: 0

test/hotspot/gtest/nmt/test_vmatree.cpp:220: Failure
Expected equality of these values:
  diff.tag[from].reserve
    Which is: 0
  upd.reserve[0]
    Which is: -100
Ex. State: 2, op: 2, use-tag:0, from==to: 0

test/hotspot/gtest/nmt/test_vmatree.cpp:222: Failure
Expected equality of these values:
  diff.tag[to].reserve
    Which is: 0
  upd.reserve[1]
    Which is: 100
Ex. State: 2, op: 2, use-tag:0, from==to: 0

[  FAILED  ] NMTVMATreeTest.UpdateRegionTest_vm (0 ms)
[----------] 18 tests from NMTVMATreeTest (17 ms total)

[----------] Global test environment tear-down
[==========] 18 tests from 1 test suite ran. (17 ms total)
[  PASSED  ] 16 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] NMTVMATreeTest.TestConsistencyWithSimpleTracker_vm
[  FAILED  ] NMTVMATreeTest.UpdateRegionTest_vm

 2 FAILED TESTS
ERROR: RUN_ALL_TESTS() failed. Error 1
Finished running test 'gtest:NMTVMATreeTest/server'
Test report is stored in build/macosx-aarch64-server-release/test-results/gtest_NMTVMATreeTest_server

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
>> gtest:NMTVMATreeTest/server                          18    16     2     0     0 <<
==============================
TEST FAILURE

make[1]: *** [main] Error 1
make: *** [test] Error 2

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

PR Comment: https://git.openjdk.org/jdk/pull/24028#issuecomment-2895904305


More information about the hotspot-runtime-dev mailing list