RFR: 8281946: VM.native_memory should report size of shareable memory [v3]
Ioi Lam
iklam at openjdk.org
Mon Dec 5 20:04:56 UTC 2022
On Mon, 5 Dec 2022 18:41:54 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> The native memory reporting has been improved to also include the amount of shareable (read only) data. Verified with test tiers 1,2, and 4.
>>
>> Sample output:
>>
>> Total: reserved=33890498670, committed=2360907886, readonly=8315472
>> malloc: 75159662 #26118
>> mmap: reserved=33815339008, committed=2285748224, readonly=8315472
>> .............
>> - Shared class space (reserved=16777216, committed=13545472, readonly=8315472)
>> (mmap: reserved=16777216, committed=13545472)
>>
>> - Arena Chunk (reserved=441792, committed=441792)
>> (malloc=441792)
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Comments and suggestions
Changes requested by iklam (Reviewer).
src/hotspot/share/services/memReporter.cpp line 46:
> 44: size_t MemReporterBase::readonly_total(FileMapInfo* info) const {
> 45: size_t total = 0;
> 46: FileMapRegion* r;
This line can be removed.
src/hotspot/share/services/memReporter.hpp line 84:
> 82:
> 83: // Print summary total, malloc and virtual memory
> 84: void print_total(size_t reserved, size_t committed, size_t read_only) const;
The default parameter should be placed in the function declaration (here) and not in the function definition (in the cpp file).
-------------
PR: https://git.openjdk.org/jdk/pull/11401
More information about the hotspot-runtime-dev
mailing list