Eclipse MAT Easy! helps you find OutOfMemoryError due to collection retaining objects consuming a significant part of Java Heap. Plugin provides a new view named "Collection tree".
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Eclipse MAT Easy!

From my own experience, OutOfMemoryError are often due to a "Collection" instance retaining all objects in Java Heap. We all have our recipe to deal with OOME. Mine is quite simple, I get the dominator tree view, and I go down all the levels as long as the retained heap is high. And I often found an API Collection instance as java.util.List, java.util.Set or java.util.Map.

This plugin provides a new view Collection tree alt text

You can access it with this new action in toolbar: alt text

This view is quite similar to the Dominator Tree alt text For each object, you have its size if it's a Collection, retained heap and percentage of total heap used.

View uses default IClassSpecificNameResolver instances to display name as in the Dominator Tree. However "Collection" instances like java.util.List, java.util.Set or java.util.Map are displayed differently to show the refered field in the problematic class.

alt text

In example : You can see that field Collection values in class com.github.qlefevre.eclipse.mat.test.heapdump.BagB retains 37.81% of total heap. Instance java.util.HashSet has 63404 elements and retains 8.24 MB.



You can download a prepackaged version with eclipse-mat-easy plugin already installed : Windows(x86_64) Linux(x86_64)

Update site

Note for Memory Analyzer 1.7.0: you must disable "Eclipse Oxygen" update site before installing plugins otherwise your MAT installation will get broken.

To disable Eclipse Oxygen in MAT 1.7.0, perform the following:

  1. Open MAT Settings
  2. Open Install/Update, Available Software Sites
  3. Uncheck Eclipse Oxygen
  4. Click Ok

Use the following update repository to install the latest released version:

To install Eclipse MAT Easy plugin, perform the following:

  1. Open Help, Install New Software...
  2. For MAT 1.7.0: in case you have not disabled Eclipse Oxygen update site, click Available Software Sites and disable Oxygen there
  3. Click Add, it will open a Add Repository window
  4. Type Eclipse MAT Easy update site to the Name field
  5. Type to the Location field
  6. Click Ok
  7. All the checkboxes can be left by default (Show only latest version, Group items by category, ...)
  8. Check Eclipse MAT Easy ! category
  9. Click Next (Available Software)
  10. Click Next (Installation Details)
  11. Accept License
  12. Click Finish and restart MAT

The following update site can be used to get development builds:

Supported collection implementations

Package Class Type Extract Size Library
alt text java.util alt text ArrayList
alt text LinkedList
alt text Arrays$ArrayList
alt text List alt text Yes JDK
alt text java.util alt text HashSet
alt text LinkedHashSet
alt text TreeSet
alt text Set alt text Yes JDK
alt text java.util.concurrent alt text ConcurrentSkipListSet alt text Set No JDK
alt text java.util alt textHashMap
alt textIdentityHashMap
alt textLinkedHashMap
alt textTreeMap
alt textWeakHashMap
alt text Map alt text Yes JDK
alt text java.util.concurrent alt textConcurrentHashMap
alt textConcurrentSkipListMap
alt text Map No JDK
alt text org.apache.commons.collections.list
alt text org.apache.commons.collections4.list
alt textCursorableLinkedList
alt textFixedSizeList
alt textGrowthList
alt textLazyList
alt textNodeCachingLinkedList
alt textPredicatedList
alt textSetUniqueList
alt textTransformedList
alt textTreeList
alt textUnmodifiableList
alt text List alt text Yes Apache
alt text org.apache.commons.collections.set
alt text org.apache.commons.collections4.set
alt textListOrderedSet
alt textUnmodifiable
alt textUnmodifiableSortedSet
alt text Set alt text Yes Apache
alt text
alt text
alt textDefaultedMap
alt textFixedSizeMap
alt textFixedSizeSortedMap
alt textFlat3Map
alt textHashedMap
alt textLazyMap
alt textLinkedMap
alt textListOrderedMap
alt textLRUMap
alt textMultiValueMap
alt textPredicatedMap
alt textReferenceIdentityMap
alt textTransformedMap
alt textUnmodifiableMap
alt textUnmodifiableOrderedMap
alt textUnmodifiableSortedMap
alt text Map alt text Yes Apache
alt text
alt text
alt textStaticBucketMap alt text Map No Apache