查看JVM堆内存对象的分布状况
1. Use JConsole to collect the memory info
0) Goto jdk\bin to start jconsole.
1) Listen to the started Java Application
2) Navigate to Tab MBeans > com.sun.management > HotspotDiagnostic > Operations > dumpHeap
3) Fill the output file name for parameter p0
4) Click button "dumpHeap" to generate the output file.
2. Use jhat
use jhat command to start the web server for the data presenation based on the output file by jconsole.
jhat <fileName>
3. Start browser to open it like http://localhost:7000
All the object heap histo is shown on the web page.