我可以针对堆转储文件运行Java垃圾回收吗? [英] Can I run Java garbage collection against a heap dump file?

查看:121
本文介绍了我可以针对堆转储文件运行Java垃圾回收吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个巨大的Java堆转储文件。它还包含(我相信)无法访问的对象,这将是JVM收集的垃圾(或者希望如此)。

I have a huge Java heap dump file. It also contains (I believe) unreachable objects, that would be garbage collected by the JVM (or so one hopes).

有没有一种工具可以让我运行垃圾收集器对付这个文件,以便我可以

Is there a tool that allows me to run the garbage collector against this file, so that I can


  1. 摆脱无用的数据
  2. 验证/使用各种算法模拟垃圾收集以查看它们的工作情况。
  3. 识别垃圾收集问题
  1. get rid of useless data
  2. verify/simulate garbage collection with the various algorithms to see how well they work
  3. identify garbage collection problems


推荐答案

没有关于2 + 3的想法(我认为这是不可能的),但至少需求1是Eclipse Memory Analyzer中的默认设置

No idea about 2+3 (and I don't think it would be possible) but at least requirement 1 is the default in the Eclipse Memory Analyzer

默认情况下,无法访问的对象在解析时会从堆转储中移除,并且不会出现在类直方图,支配树等中。

"By default unreachable objects are removed from the heap dump while parsing and will not appear in class histogram, dominator tree, etc"

http://wiki.eclipse.org/MemoryAnalyzer/FAQ

这篇关于我可以针对堆转储文件运行Java垃圾回收吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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