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

浪尽此生 提交于 2019-12-12 18:46:02

问题


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. 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

回答1:


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



来源:https://stackoverflow.com/questions/9662337/can-i-run-java-garbage-collection-against-a-heap-dump-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!