mmtk-core icon indicating copy to clipboard operation
mmtk-core copied to clipboard

Support for heap dumps triggered by the VM

Open erik-brangs opened this issue 4 years ago • 3 comments

Production JVMs like HotSpot or OpenJ9 provide the possibility to trigger heap dumps. Those dumps can then be analyzed with tools like the Eclipse Memory Analyzer.

The old Java implementation of MMTk didn't provide explicit support for heap dumps.

Will the new MMTk provide the ability to do heap dumps (possibly in the far future)? This would probably require traversing the whole heap and calling VM-specific code to handle each object. It might also be helpful to be able to free up as much memory as possible before the dump in order to reduce the size of the dump. Additionally, it is generally necessary to enumerate all the roots: heap dump parsers might do their own garbage collection pass and remove objects if a root is missing.

I looked at the documentation for the VM-to-MMTk interface and did not find any indications that this is currently supported.

erik-brangs avatar Dec 30 '20 16:12 erik-brangs

Hi @erik-brangs Thanks for the issue. Yes, we will need to support heap dumping. Probably we will support heap dumps by transitive closure and linear scan. However, we don't have a detailed plan yet. Any suggestion or requirement would be helpful.

qinsoon avatar Jan 02 '21 23:01 qinsoon

Related issue: https://github.com/mmtk/mmtk-core/issues/803

qinsoon avatar Jan 03 '24 02:01 qinsoon

Also related to https://github.com/mmtk/mmtk-core/issues/795

wks avatar Jan 03 '24 02:01 wks