下載下來一點dump文件很大,而後使用mat分析的時候mat自己報錯linux
這是由於eclipse配置的內存過小了致使的,網上查了下都是去改MemoryAnalyzer.ini的參數內容服務器
但對於ecplise內置安裝插件來講是找不到這個文件的,dom
去官網查看https://wiki.eclipse.org/MemoryAnalyzer/FAQeclipse
Well, analyzing big heap dumps can also require more heap space. Give it some more memory (possible by running on a 64-bit machine):ide
MemoryAnalyzer.exe -vmargs -Xmx4g -XX:-UseGCOverheadLimit
Alternatively, edit the MemoryAnalyzer.ini
to contain:ui
-vmargs-Xmx2gspa
-XX:-UseGCOverheadLimit
As a rough guide, Memory Analyzer itself needs 32 to 64 bytes for each object in the analyzed heap, so -Xmx2g might allow a heap dump containing 30 to 60 million objects to be analyzed. Memory Analyzer 1.3 using -Xmx58g has successfully analyzed a heap dump containing over 948 million objects.插件
The initial parse and generation of the dominator tree uses the most memory, so it can be useful to do the initial parse on a large machine, then copy the heap dump and index files to a more convenient machine for further analysis.code
For more details, check out the section Running Eclipse in the Help Center. It also contains more details if you are running on Mac OS X.orm
If you are running the Memory Analyzer inside your Eclipse SDK, you need to edit the eclipse.ini
file.
也就是最後這句話,若是是eclipse內置安裝的話就去改eclipse.ini的參數就能夠了
另外附linux服務器生成dump文件命令:
jmap -dump:format=b,file=heapdump.phrof pid