I want to profile Eclipse’s memory usage and not a program under Eclipse.
I have a small Java GWT program and just loading the Eclipse workspace brings up memory usage to 850m… and when ~1024m is reached, the whole thing crawls to snail pace i.e. unusable.
I have increased to 2048m the heap of Eclipse but somehow Eclipse only seem to be able to use 1024m max (I am using open-jdk on Linux Ubuntu 10.10).
Please help!
Profiling the memory usage of Eclipse, is no different from profiling any other Java application.
As long as you have started Eclipse with a JVM capable of providing you with HPROF dumps, you can obtain a dump using the
jmaputility that is commonly available with the associated installation of the JVM.The HPROF dump may later be opened using Eclipse MAT or another dump analyzer. Note: Eclipse MAT supports other dump formats as well, so you are not restricted to the Hotspot JVM alone.
A walkthrough of this process, can be found in this post detailing how MAT was used to analyze the memory usage of Eclipse and pinpoint the memory consumption of the spellchecker plugin.
If you want to perform live profiling, then you have to start the JVM associated with Eclipse with a suitable profiling agent, and then attach the profiler to the Eclipse JVM. Instructions would vary from one profiler to another.