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:21:00 UTC 2025


On Mon, 17 Mar 2025 10:07:50 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed a bug.
>
> src/hotspot/share/nmt/vmatree.cpp line 96:
> 
>> 94:           && !(state == StateType::Reserved && !use_tag_inplace)            // we are not reserving a new region
>> 95:           && !NativeCallStackStorage::is_invalid(leqA_n->val().out.stack()) // the primary stack is already filled
>> 96:          ) {
> 
> These conditions can be refactored out and given useful names:
> 
> ```c++
> bool baz = ...;
> bool foo = ...;
> boo bar = ...;
> if (baz || (foo && bar)) { /* ... */ }

Done.

> src/hotspot/share/nmt/vmatree.hpp line 128:
> 
>> 126: 
>> 127:     NativeCallStackStorage::StackIndex second_stack() const {
>> 128:       return second_idx;
> 
> Rename accessors into `reserved_stack` and `committed_stack` and add `bool has_committed_stack()`?

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2000558687
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2000559027


More information about the hotspot-runtime-dev mailing list