- Find the process id of Eclipse. You can use the
jps
command to help. - Now dump out the java object heap using the
jmap
command. For example:jmap -dump:format=b,file=C:\temp\eclipse_heap.bin 3080
- Open the heap file (C:\temp\eclipse_heap.bin) in Eclipse.
- A Leak Suspects Report: My main suspect was
org.maven.ide.components.nexus_indexer
occupying 24,201,456 (24.29%) bytes. - A Histogram which lists the number of instances per class. There were 583,760
char[]
objects and 439,572String
objects on my heap. - Dominator Tree which lists the biggest objects and what they keep alive. Mine were:
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader @ 0x3f46368 org.maven.ide.components.nexus_indexer
(23.1 MB)org.eclipse.jdt.internal.core.JavaModelManager @ 0x4710728
(15.2 MB)org.eclipse.jdt.internal.core.search.indexing.IndexManager @ 0x475c3e8
(9.7 MB)org.eclipse.jdt.internal.ui.text.spelling.SpellCheckEngine @ 0x3d617a8
(6.5 MB)
- Top Consumers which lists the most expensive objects grouped by class and package.
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager
(26.1 MB).
Further Reading:
Eclipse Memory Analyzer, 10 useful tips/articles
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.