Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Retained heap calculated incorrectly in dominator tree?(Question about the retained heap being shown)
Retained heap calculated incorrectly in dominator tree? [message #1822098] Thu, 27 February 2020 09:35 Go to next message
Hermann Huebler is currently offline Hermann HueblerFriend
Messages: 3
Registered: February 2020
Junior Member
While analyzing a Linux core taken from an IBM JVM it seems like the retained heap is calculated incorrectly. I went thru the threads and then right-clicked on an object --> Java Basics --> Open In Dominator tree to inspect a HashMap entry.

When looking at the
file:///home/hhuebler/Pictures/Selection_329.png we can see that the java.util.HashMap$Entry has a Shallow Heap and a Retained Heap of 24 bytes. However, we can see that the the entry has several references (key, value, next, hash). The value is another Object which when I go into it file:///home/hhuebler/Pictures/Selection_330.png shows a retained size of 320 file:///home/hhuebler/Pictures/Selection_331.png

Therefore I'm wondering if the retained size of the java.util.HashMap$Entry should not contain the retained size of the ASCLModel.investigate.impl.AnalysisOptionsExtendedImpl object as well?
Re: Retained heap calculated incorrectly in dominator tree? [message #1822173 is a reply to message #1822098] Fri, 28 February 2020 16:15 Go to previous message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
The HashMap$Entry object will only retain the object via the value field if there is no other path from GC roots to the value object except via the HashMap$Entry object.

Try selecting the object of type ASCLModel.investigate.impl.AnalysisOptionsExtendedImpl and running 'Path to GC Roots' query and see how it is retained.
Previous Topic:Get list_objects in a custom mat report
Next Topic:MAT Heap Dump Comparison Algorithm
Goto Forum:
  


Current Time: Thu Apr 18 03:03:47 GMT 2024

Powered by FUDForum. Page generated in 0.01833 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top