jvisualvm:坚持“装载堆转储”屏幕 [英] jvisualvm: Stuck on "Loading Heap Dump" screen

查看:298
本文介绍了jvisualvm:坚持“装载堆转储”屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此命令使用hprof创建了一个堆转储文件:

I created a heap dump file with hprof using this command:

java -agentlib:hprof -cp "..\..\jars\trove.jar;.\bin" com.mysite.MyApp

这成功创建了大约5MB的文件java.hprof.txt。然后我打开jvisualvm来查看这个文件,并加载它。但是visualvm似乎卡在加载屏幕上。下面的屏幕现在已经上升了大约10分钟。

This successfully created the file "java.hprof.txt" which was about 5MB. I then opened up jvisualvm to view this file, and loaded it in. But visualvm appears to be stuck on the loading screen. The screen below has been up for about 10 minutes now.

我错过了一步吗?我应该在命令行中使用hprof使用不同的选项吗?如何读取此堆转储文件?

Did I miss a step? Should I have used different options on the command line with hprof? How can I read this heap dump file?

推荐答案

VisualVM支持二进制HPROF格式的堆转储。使用VisualVM创建堆转储更容易。如果无法使用VisualVM,则可以使用 jmap -dump:live,format = b,file = heap.bin< pid> 。优点是您不需要任何特殊的启动参数,并且hprof代理库不会导致速度减慢。

VisualVM supports heap dumps in binary HPROF format. It is easier to use VisualVM to create heap dump. If this is not possible use VisualVM, you can use jmap -dump:live,format=b,file=heap.bin <pid>. The advantage is that you don't need any special startup arguments and there is no slow down caused by hprof agent library.

这篇关于jvisualvm:坚持“装载堆转储”屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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