如何在java中使用jmap分析堆转储 [英] How to analyse the heap dump using jmap in java

查看:182
本文介绍了如何在java中使用jmap分析堆转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令创建堆转储:

I am creating heap dump using below command:

jmap -dump:file=DumpFile.txt <process-id>

我已经打开了生成的文件--DumpFile.txt,但它不是可读格式。
所以,请让我知道如何分析生成的文件中的数据。

I have opened the generated file - DumpFile.txt but it is not in readable format. So please let me know how to analyze the data in the generated file.

推荐答案

你应该使用 jmap -heap:format = b< process-id> 没有任何路径。因此,它会创建一个* .bin文件,您可以使用 jvisualvm.exe (与jmap相同的路径)打开该文件。这是打开此类转储文件的绝佳工具。

You should use jmap -heap:format=b <process-id> without any paths. So it creates a *.bin file which you can open with jvisualvm.exe (same path as jmap). It's a great tool to open such dump files.

这篇关于如何在java中使用jmap分析堆转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆