Monday, November 24th, 2008...11:05 am
Java Profiling in Eclipse
Jump to Comments
Recently we needed to resolve some performance issues, so I looked for the tool and started in eclipse plugin list. Luckily I found a one.
You need to have binary dump of your heap in order to load it there and analyse. You can find how to do that here
But this tool is not a silver bullet, and sometimes analysing text dump is sufficient and more interesting(low level stuff), depending on what you exactly need.
On VM side I found the following useful params:
- Make GC talk to us: -verbose:gc
- Show us when garbage collection cycles happen: -XX:+PrintGCTimeStamps
- If some 3rd library introduced CPU bound by querying System.gc(), make them calm: -XX:+DisableExplicitGC
- Dump heap on error:-XX:+HeapDumpOnOutOfMemoryError
- Specify dump info you are interested in: -agentlib:hprof=heap=sites,cpu=samples, file=/home/user/user.hprof, cutoff=0,lineno=y,thread=y,doe=n “
Leave a Reply