RFR: 8337217: Port VirtualMemoryTracker to use VMATree [v32]
Afshin Zafari
azafari at openjdk.org
Thu Feb 27 21:04:15 UTC 2025
On Thu, 27 Feb 2025 13:29:47 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:
>>
>> removed UseFlagInPlace test.
>
> src/hotspot/share/nmt/nmtTreap.hpp line 416:
>
>> 414: if (cmp_from >= 0 && cmp_to < 0) {
>> 415: if (!f(head))
>> 416: return;
>
> Style: Always use braces in if statements.
Done.
> src/hotspot/share/nmt/regionsTree.hpp line 62:
>
>> 60: inline VMATree::StateType in_state() { return _node->val().in.type(); }
>> 61: inline VMATree::StateType out_state() { return _node->val().out.type(); }
>> 62: inline size_t distance_from(NodeHelper& other) { return position() - other.position(); }
>
> `assert(position() > other.position()`.
Done.
> src/hotspot/share/nmt/regionsTree.hpp line 82:
>
>> 80: );
>> 81: }
>> 82: };
>
> 1. Doesn't need to be inline, move to `cpp` file.
>
> 2. No need to cast to `int`, just use the `VMATree::StateType` directly.
>
> 3. Should be wrapped in `#ifdef ASSERT` probably, I don't see us shipping this in product builds.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1974328543
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1974331320
PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1974328760
More information about the hotspot-dev
mailing list