RFR: JDK-8269571: NMT should print total malloc bytes and invocation count

Thomas Stuefe stuefe at openjdk.java.net
Tue Jun 29 13:02:03 UTC 2021


On Tue, 29 Jun 2021 11:18:48 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> At the moment NMT prints a total of reserved and committed bytes. If one wants to know how much C-Heap the VM uses, one needs to add all numbers from the sub categories.
>> 
>> It would be helpful would NMT print the total number of malloced memory and additionally the malloc invocation count.
>> 
>> ----
>> 
>> This patch modifes the printout to print, in addition to totals, the number of malloced bytes, malloc invocation counts, and number of mmap reserved/committed bytes. This mirrors the way we print individual sub categories and allocation sites.
>> 
>> Before:
>> 
>> Native Memory Tracking:
>> 
>> Total: reserved=18489703KB, committed=1183967KB
>> 
>> 
>> After:
>> 
>> 
>> Native Memory Tracking:
>> 
>> Total: reserved=18491726KB, committed=1183178KB
>>        malloc: 40590KB #13669
>>        mmap:   reserved=18451136KB, committed=1142588KB
>> 
>> 
>> Tests: Ran hotspot/runtime/NMT jtreg tests.
>
> Good to me.

Thank you @zhengyu123

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

PR: https://git.openjdk.java.net/jdk/pull/4622


More information about the hotspot-runtime-dev mailing list