简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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