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

Afshin Zafari azafari at openjdk.org
Sat Apr 12 23:06:46 UTC 2025


On Fri, 11 Apr 2025 08:26:41 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi,
> 
> Are we skipping any cases where an operation is done over multiple regions?
> 
> If we have:
> 
> ```
>     // Post: .........0********20---------25********50--------80********100.........
>     //        mtNone    mtTest    mtTest      mtTest   mtTest     mtTest    mtNone
>     //        Rl        C         Rs          C        Rs         C         Rl
>     //        -         si_1      si_3        si_1     si_1       si_1      -
>     //        -         si_2      -           si_2     -          si_2      -
> ```
> 
> And we uncommit `[0, 100)`, then what is the result?
> 
> Are we going to ignore these cases for now?

10 new test-cases are added for covering these.

> test/hotspot/gtest/nmt/test_vmatree.cpp line 792:
> 
>> 790:     }
>> 791: 
>> 792:     snprintf(for_this_node, sizeof(for_this_node), "test at line: %d, for node: %d", line_no, et.nodes[i]);
> 
> Here, you can use a `stringStream` to print, and then use `.base()` to access the underlying string. That means you have no limit on the length of the line.

Done.

> test/hotspot/gtest/nmt/test_vmatree.cpp line 876:
> 
>> 874:     check_tree(tree, et2, __LINE__);
>> 875: 
>> 876:     tree.commit_mapping(0, 20, call_stack_2, true); // commit at the begin of the region
> 
> beginning

Done.

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

PR Comment: https://git.openjdk.org/jdk/pull/24028#issuecomment-2799070738
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2040757858
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2040757881


More information about the hotspot-runtime-dev mailing list