RFR: 8312132: Add tracking of multiple address spaces in NMT [v2]
Stefan Karlsson
stefank at openjdk.org
Tue Mar 26 13:04:25 UTC 2024
On Wed, 20 Mar 2024 15:43:25 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Include the mutex header
>
> src/hotspot/share/gc/z/zNMT.cpp line 43:
>
>> 41: }
>> 42: void ZNMT::uncommit(zoffset offset, size_t size) {
>> 43: MemTracker::free_memory_in(ZNMT::_device, (size_t)offset, size);
>
> Suggestion:
>
> MemTracker::free_memory_in(ZNMT::_device, untype(offset), size);
Didn't this suggestion work? If not, maybe you could at least change it to `(size_t)untype(offset)`. We like to try to avoid direct c-style casts of ZGC's typed values, and instead use the functions that perform extra checks.
> src/hotspot/share/gc/z/zNMT.hpp line 34:
>
>> 32: #include "utilities/globalDefinitions.hpp"
>> 33: #include "utilities/nativeCallStack.hpp"
>> 34: #include "nmt/memTracker.hpp"
>
> Sort order
You didn't fix the sort order here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1539179386
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1539179855
More information about the hotspot-dev
mailing list