RFR: 8312132: Add tracking of multiple address spaces in NMT [v46]

Johan Sjölen jsjolen at openjdk.org
Mon Apr 29 12:32:40 UTC 2024


On Tue, 23 Apr 2024 12:55:33 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove faulty condition after removing merging
>>  - Add failing test case
>
> src/hotspot/share/nmt/nmtMemoryFileTracker.cpp line 65:
> 
>> 63: }
>> 64: 
>> 65: void MemoryFileTracker::print_report_on(const MemoryFile* device, outputStream* stream, size_t scale) {
> 
> check for invalid arguments: `nullptr` and `0`.

We let scale being 0 slide through, not up to our interface to decide if that's valid or not. We do nullptr checks in the `MemoryFileTracker::Instance` case, as that is the 'public' API.

> src/hotspot/share/nmt/nmtMemoryFileTracker.cpp line 121:
> 
>> 119: }
>> 120: 
>> 121: void MemoryFileTracker::Instance::allocate_memory(MemoryFile* device, size_t offset,
> 
> check invalid args.

Done in MemTracker

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1583011006
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1583011535


More information about the hotspot-dev mailing list