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:26:21 UTC 2025
On Mon, 17 Mar 2025 09:59:42 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/nmtNativeCallStackStorage.hpp line 53:
>
>> 51:
>> 52: static bool is_invalid(StackIndex a) {
>> 53: return a == invalid || a < 0;
>
> If this change is necessary, then there's a bug in the code.
fixed.
> src/hotspot/share/nmt/vmatree.hpp line 95:
>
>> 93: uint8_t type_tag[2];
>> 94: NativeCallStackStorage::StackIndex sidx; // call-stack of all operations
>> 95: NativeCallStackStorage::StackIndex second_idx; // call-stack when committing/uncommitting the start-node of a reserved region
>
> These can be called `primary_stack` and `secondary_stack`. Does an uncommitted region really have a stack?
renamed.
Yes uncommit also has stack although never reported. `VMATree::register_mapping()` will save the stack in the nodes, regardless of the operation. It is done when constructing the `stA` and `stB` interval-states:
IntervalChange stA{
IntervalState{StateType::Released, empty_regiondata},
IntervalState{ state, metadata}
};
IntervalChange stB{
IntervalState{ state, metadata},
IntervalState{StateType::Released, empty_regiondata}
};
The stack may be empty or whatever passed in by `metadata` arg.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2000569649
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2000569358
More information about the hotspot-runtime-dev
mailing list