mmtk-core
mmtk-core copied to clipboard
Support for heap dumps triggered by the VM
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.
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.
Related issue: https://github.com/mmtk/mmtk-core/issues/803
Also related to https://github.com/mmtk/mmtk-core/issues/795