简体   繁体   English

我可以对堆转储文件运行Java垃圾回收吗?

[英]Can I run Java garbage collection against a heap dump file?

I have a huge Java heap dump file. 我有一个巨大的Java堆转储文件。 It also contains (I believe) unreachable objects, that would be garbage collected by the JVM (or so one hopes). 它还包含(我相信)无法访问的对象,这些对象将由JVM垃圾回收(或者有人希望如此)。

Is there a tool that allows me to run the garbage collector against this file, so that I can 是否有工具允许我对此文件运行垃圾收集器,以便我可以

  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 识别垃圾收集问题

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 不知道2 + 3(我认为不可能),但是至少要求1是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 http://wiki.eclipse.org/MemoryAnalyzer/FAQ

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM