RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v34]
Afshin Zafari
azafari at openjdk.org
Tue Jun 3 09:58:58 UTC 2025
On Mon, 2 Jun 2025 15:04:41 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> old format comments are removed. Redundant tests are removed.
>
> src/hotspot/share/nmt/vmatree.cpp line 116:
>
>> 114: const int op_index = req.op_to_index();
>> 115: const Operation op = req.op();
>> 116: assert(op != Operation::Invalid && op_index >= 0 && op_index < 4, "should be");
>
> RE: "op_index >= 0 && op_index < 4"
> Can we use the class constants here, instead of hardcoding to int values?
The constant values are index and I intentionally name the variable as `op_index`. Since the index is used for accessing elements of an array later, the range of valid values are checked, `0` and the size of the array.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2123330373
More information about the hotspot-runtime-dev
mailing list