RFR: 8350567: NMT: update VMATree::register_mapping to copy the existing tag of the region [v2]
Afshin Zafari
azafari at openjdk.org
Mon Mar 3 12:11:42 UTC 2025
On Sun, 2 Mar 2025 20:12:41 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - removed extra whitespace.
>> - unit test added.
>
> src/hotspot/share/nmt/vmatree.cpp line 80:
>
>> 78: MemTag tag = leqA_n->val().out.mem_tag();
>> 79: stA.out.set_tag(tag);
>> 80: LEQ_A.state.out.set_tag(tag);
>
> Shouldn't `LEQ_A.state.out`'s tag already be `tag`? Is this line really necessary?
It's not. Removed.
> src/hotspot/share/nmt/vmatree.cpp line 210:
>
>> 208:
>> 209: // Finally, we can register the new region [A, B)'s summary data.
>> 210: MemTag tag_to_change = use_tag_inplace ? stA.out.mem_tag() : metadata.mem_tag;
>
> Do we ever change the `stA.out.mem_tag()` ? Can't it always be `stA.out.mem_tag()`?
Yes, it is changed in line 79 above.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23771#discussion_r1977351075
PR Review Comment: https://git.openjdk.org/jdk/pull/23771#discussion_r1977350774
More information about the hotspot-runtime-dev
mailing list