Skip to content

[GR-10518] Native Image heap dumps are polluted by objects created during heap dump creation #4637

@fniephaus

Description

@fniephaus

When dumping the heap of a native executable to analyze it in VisualVM, the heap dump is polluted by objects that are created during the heap dump creation.

This makes it hard to analyze smaller heap dumps, especially initial heaps obtained through -XX:+DumpHeapAndExit, as they are often dominated by the objects created during heap dump creation. Here's an example screenshot of a heap dump for a native HelloWorld:
Screenshot from 2022-06-10 14-45-41

The heap dump pollution can be avoided by using only unmanaged, native memory within the heap dump writer rather than managed, heap-allocated objects.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions