如何分析.hprof文件? [英] How do I analyze a .hprof file?

查看:2137
本文介绍了如何分析.hprof文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的生产服务器运行时带有以下标志: - XX:+ HeapDumpOnOutOfMemoryError

I have a production server running with the following flag: -XX:+HeapDumpOnOutOfMemoryError

昨晚它生成了一个java-38942。我们的服务器遇到堆错误时的hprof文件。事实证明,系统的开发人员知道标志,但无法从中获取任何有用的信息。

Last night it generated a java-38942.hprof file when our server encountered a heap error. It turns out that the developers of the system knew of the flag but no way to get any useful information from it.

任何想法?

推荐答案

如果你想要一个相当先进的工具来做一些严肃的工作,请看 Memory Analyzer项目由SAP为他们做出贡献。

If you want a fairly advanced tool to do some serious poking around, look at the Memory Analyzer project at Eclipse, contributed to them by SAP.

你可以做的一些事情是令人兴奋的好事用于查找内存泄漏等 - 包括针对内存中对象运行一种有限SQL(OQL)形式,即

Some of what you can do is mind-blowingly good for finding memory leaks etc -- including running a form of limited SQL (OQL) against the in-memory objects, i.e.


SELECT toString( firstName)FROM com.yourcompany.somepackage.User

SELECT toString(firstName) FROM com.yourcompany.somepackage.User

非常棒。

这篇关于如何分析.hprof文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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