Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 711
Thilo Avatar asked Sep 16 '25 09:09

Thilo


1 Answers

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

like image 151
moodywoody Avatar answered Sep 19 '25 08:09

moodywoody