RFR: JDK-8297958: NMT: Display peak values [v2]
Thomas Stuefe
stuefe at openjdk.org
Tue Dec 6 12:46:10 UTC 2022
On Tue, 6 Dec 2022 12:09:31 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>>> Important addition to the memory stats in my opinion. I agree having it in release build would be great.
>>>
>>> > I omit printing peak values when we are at peak. So if "peak" is missing, current peak is implied.
>>>
>>> It can be confusing for others not aware of this behavior, and may think that the "peak" value is missing in the output. I believe it would be less confusing if "peak" is "always" displayed.
>>
>> Thank you, @ashu-mehra!
>>
>> The first version had "(peak)" written after every line if at current peak. I found the output cluttered, but let's see what others say. I'm fine with reintroducing it again.
>>
>> Cheers, Thomas
>
>> > Important addition to the memory stats in my opinion. I agree having it in release build would be great.
>> > > I omit printing peak values when we are at peak. So if "peak" is missing, current peak is implied.
>> >
>> >
>> > It can be confusing for others not aware of this behavior, and may think that the "peak" value is missing in the output. I believe it would be less confusing if "peak" is "always" displayed.
>>
>> Thank you, @ashu-mehra!
>>
>> The first version had "(peak)" written after every line if at current peak. I found the output cluttered, but let's see what others say. I'm fine with reintroducing it again.
>>
>> Cheers, Thomas
>
> If we are at peak, then instead of writing `(malloc=XKB #Y) (peak=XKB #Y)` (this is what it'd look like, right?) you can write `(malloc=XKB #Y) at peak`. It makes the peaking events visually distinct for experienced users without having to match numbers (also easy regexing) and serves as an indication to new users as to what's going on. It could be misinterpreted, but I think the context of a full log makes it obvious what's going on.
Hi @jdksjolen,
thanks a lot for the quick review. You and @ashu-mehra both wanted a visual indication for the current peak, I added that:
- Compiler (reserved=200KB, committed=200KB)
(malloc=35KB #57) (peak=50KB #62)
(arena=165KB #5) (peak=6512KB #18)
- Internal (reserved=1042KB, committed=1042KB)
(malloc=1006KB #28240) (at peak)
(mmap: reserved=36KB, committed=36KB)
- Other (reserved=2KB, committed=2KB)
(malloc=2KB #1) (peak=524290KB #67108865)
- Symbol (reserved=1416KB, committed=1416KB)
(malloc=1056KB #10614) (at peak)
(arena=360KB #1) (at peak)
Cheers, Thomas
-------------
PR: https://git.openjdk.org/jdk/pull/11497
More information about the hotspot-runtime-dev
mailing list