RFR: JDK-8297958: NMT: Display peak values [v4]

Stefan Johansson sjohanss at openjdk.org
Tue Dec 6 15:59:34 UTC 2022


On Tue, 6 Dec 2022 15:51:21 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Christ this is complex. :-(
>> 
>> Both detail reporter and summary reporter share this printer code, but via MEMFLAG the print output is subtly changed. MEMFLAG=mtNone is taken as "print in summary report format" and != mtNone is "print in detail report format". This is all fixable but makes the already convoluted report not prettier.
>> 
>> The other option would be to, in MallocMemorySnapshot::make_adjustment(), set the count to zero. But I don't dare this because afterwards the counter would assert if it were to be decreased further.
>> 
>> See this mess? MallocMemorySnapshot is not really usable anymore as counter holder after the adjustment is made, because mtChunk counter got modified and now may assert for negative overflow. I believe MallocMemorySnapshot::make_adjustment() is only valid if you don't modify the counters anymore afterwards.
>> 
>> I decided to leave it as it is. I don't think that anyone cares. As I wrote, I have plans to simplify this.
>
> Fine by me =)

I guess this comment should go as well, right?

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

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


More information about the hotspot-runtime-dev mailing list