Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mat-dev] Next release of Memory Analyzer

Hi Vladimir,

> "Smart" format would require everybody to watch carefully for a letter in the middle of the value. That is a notable cognitive load.

That's a fair point.

> 1) I often see java.math.BigInteger (BigDecimal) in heap dumps, and it is a pity MAT misses default resolvers for that. In other words, its is hard to tell the value by analyzing the dump.

This is certainly doable but just taking a quick look at a dump with some BigDecimals from one particular JVM, I see about 10-15 fields, so it doesn't appear trivial to create a resolver. This would involve looking at implementations, so the time consuming part would be to investigate if there are multiple implementations and adding tests, and we'd also have to be careful with legal since we can't just blindly dump the code of Big*.toString into MAT. I suggest opening a bug (as feature request) in the MAT bug system to request this.

> 2) I often see middle-sized strings (e.g. 20KiB SQL or XML), and it would be great if MAT could show that string in a popup window (with line wraps).

If you right click a String > Copy > Value, or Save Value to File, then you'll get the whole string (for sure in the latter query, although I'm not sure if copy to clipboard has a limit, e.g. in some operating systems). The latter query then allows you to open the text file in an editor which will display line wraps. I like the idea of a simple popup but I think it would be non-trivial because we'd have to add logic like modern editors have to not simply put the whole string into memory, but add logic that displays only what's in viewport. Otherwise, a user could try to look at a very large String and cause MAT to go OOM. Right now we just outsource this to OS editors with the Save Value to File query.

> 3) I wonder if MAT could show HashMaps in plain key-value list by default. Currently "outgoing references" shows hashMap$Entry objects, and it takes time to browse around.

More importantly, HashMaps are tree data structures, so you have to be careful simply browsing around because you might miss some entries. MAT already has a query for providing exactly what you want. Right click on a HashMap and select Java Collections > Hash Entries and click Finish.

--
Kevin Grigorenko
kevin.grigorenko@xxxxxxxxxx
IBM WebSphere SWAT


Inactive hide details for Vladimir Sitnikov ---09/04/2018 03:24:12 PM---Kevin>mentally dividing by 1024*1024 when discussing byVladimir Sitnikov ---09/04/2018 03:24:12 PM---Kevin>mentally dividing by 1024*1024 when discussing byte values they see in MAT in terms of MB (or

From: Vladimir Sitnikov <sitnikov.vladimir@xxxxxxxxx>
To: mat-dev@xxxxxxxxxxx
Date: 09/04/2018 03:24 PM
Subject: Re: [mat-dev] Next release of Memory Analyzer
Sent by: mat-dev-bounces@xxxxxxxxxxx





Kevin>mentally dividing by 1024*1024 when discussing byte values they see in MAT in terms of MB (or GB, etc.)

On the other hand, 2MiB would not differ that much from 2KiB. Current display format makes it clear: lots of digits ==> problem.
"Smart" format would require everybody to watch carefully for a letter in the middle of the value. That is a notable cognitive load.

1) I often see java.math.BigInteger (BigDecimal) in heap dumps, and it is a pity MAT misses default resolvers for that. In other words, its is hard to tell the value by analyzing the dump.
https://imgflip.com/i/2h7pvt :)

2) I often see middle-sized strings (e.g. 20KiB SQL or XML), and it would be great if MAT could show that string in a popup window (with line wraps).

3) I wonder if MAT could show HashMaps in plain key-value list by default.
Currently "outgoing references" shows hashMap$Entry objects, and it takes time to browse around. It would be so much better if "outgoing references" for map-like objects would open a flat list of entry objects (virtual ones). Of course regular (raw) view is required as well, however I think "virtual entries" view should be a default for map-like objects.

Are the ideas relevant? Could they fit into the subsequent release? (when is the release planned?)

Vladimir
_______________________________________________
mat-dev mailing list
mat-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mat-dev



Back to the top