当我尝试使用它来分析我们的应用程序时,VisualVM 崩溃了,但是如果我可以将我从应用程序中完成的 jmap 内存转储加载到 VisualVM 中,我可能会得到我需要的答案,而不必将 VisualVM 附加到我们的应用程序。跑步。
那么,有没有办法做到这一点?
Open VisualVM, click File -> Load..
and pick your jmap file.
If it is not loaded, I guess there is a problem with your file.
MAT ( http://www.eclipse.org/mat/ ) 对于比较 jmap/hprof 文件很有用。如果您有内存泄漏,请尝试使用支配树。