RFR: 8281946: VM.native_memory should report size of shareable memory [v10]

Ioi Lam iklam at openjdk.org
Mon Dec 12 17:47:13 UTC 2022


On Fri, 9 Dec 2022 23:08:29 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
>>        malloc: 75159662 #26118
>>        mmap:   reserved=33815339008, committed=2285748224
>> .............
>> -        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:
> 
>   Contained CDS info in if block

Changes requested by iklam (Reviewer).

src/hotspot/share/services/memReporter.cpp line 47:

> 45:   output()->print("reserved=" SIZE_FORMAT "%s, committed=" SIZE_FORMAT "%s",
> 46:                   amount_in_current_scale(reserved), scale,
> 47:                   amount_in_current_scale(committed), scale);

This change is unrelated and should be reverted.

test/hotspot/jtreg/runtime/NMT/SummarySanityCheck.java line 89:

> 87: 
> 88:           if(typeMatcher.group("readonly") != null) {
> 89:             long typeReadOnly = Long.parseLong(typeMatcher.group("readonly"));

Add a space behind the "if".

Also, as @tstuefe suggested, if "readonly" is present in the outline, check that the line also contains "Shared class space", since no other lines should contain "readonly".

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

PR: https://git.openjdk.org/jdk/pull/11401


More information about the hotspot-runtime-dev mailing list